# Bug COMMS-713 - Lists of work packages should sort correctly by semantic id

Project: Stream Communicator
Status: closed
URL: https://community.openproject.org/work_packages/COMMS-713

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | High |
| Module |  |
| Target versions | 17.5.0 |
| Observed in versions |  |
| Sprint |  |
| Backlog bucket |  |
| Bug found in version (deprecated) |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers | Kabiru Mwenja |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

[https://github.com/opf/openproject/pull/22719#issuecomment-4279281918](https://github.com/opf/openproject/pull/22719#issuecomment-4279281918)

Sorting is still done by database id which can look broken when work packages were moved from a different project:

<figure class="image op-uc-figure" style="height:auto;"><div class="op-uc-figure--content"><img class="op-uc-image" style="aspect-ratio:359/233;" src="https://private-user-images.githubusercontent.com/9654673/580699806-e8ea9c8d-33c9-4e56-baf9-af68f422b3b3.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Nzc5ODY2MDYsIm5iZiI6MTc3Nzk4NjMwNiwicGF0aCI6Ii85NjU0NjczLzU4MDY5OTgwNi1lOGVhOWM4ZC0zM2M5LTRlNTYtYmFmOS1hZjY4ZjQyMmIzYjMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDUwNSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjA1MDVUMTMwNTA2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZDY2MzViZTY5ODE3OWQwN2Q0YjUxN2M1MGM5NzllODZmNzIwZDg3OWRjMTM5YzVmOGY1MDExYjg5MWM5NzdmMiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.t_9FI_1FGWmz3_2CsWj7BOVJ-mK5gLeRRnced2-8-Lk" alt="image" width="359" height="233"></div></figure>

<br>

**Steps to reproduce**

1.  Use an instance which uses semantic identifiers
    
2.  Create a work package in Project A (or remember any existing old work package)
    
3.  Create a work package in Project B
    
4.  Move the work package from step 2 to Project B
    
5.  Order the list of work packages by ID
    
6.  See that the work package from step 2 has a higher sequence number but is sorted before the work package from step 3
