# Bug BNE-24 - BlockNote: OpenProject work packages are sorted by their ID instead of the last updated by

Project: Stream BlockNote extensions
Status: closed
URL: https://community.openproject.org/work_packages/BNE-24

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module | Modules and project features / Text editor / BlockNoteJS |
| Target versions | 17.0.1 |
| Observed in versions | 16.5.0 |
| Sprint |  |
| Backlog bucket |  |
| Bug found in version (deprecated) | 16.5.x |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers | Judith Roth |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

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

## Costs

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

## Description

### Steps to reproduce

1.  Login and create a collaborative document
    
2.  With / find OpenProject work package option
    
3.  When the search field appears, try searching for a work package by typing a word
    

### What is the buggy behavior?

1.  OpenProject work packages are sorted by their ID (oldest on top). This is due to the fact that the API V3 work packages endpoint is used without further specification.
    

### What is the expected behavior?

1.  They should be sorted by the last updated by for consistency with how the search works elsewhere. Checking the rest of the application, e.g. in work package descriptions, when typing # then there an endpoint is called that is not part of the API V3 and it seems it does everything we need here, too. The route is `https://qa.openproject-stage.com/api/v3/work_packages?filters=%5B%7B%22typeahead%22%3A%7B%22operator%22%3A%22**%22%2C%22values%22%3A%5B%22route%22%5D%7D%7D%5D&sortBy=%5B%5B%22updatedAt%22%2C%22desc%22%5D%5D&offset=1&pageSize=20`
    

### Environment information

**OpenProject version**

**Core build**

[01cdde53fbe71fa80ec2a36ed4bb94523e884d10](https://github.com/opf/openproject/commits/01cdde53fbe71fa80ec2a36ed4bb94523e884d10)

**Product version**

[a58c32168495791b5944adbc577c4f0db8b1af03](https://github.com/opf/saas-openproject/commits/a58c32168495791b5944adbc577c4f0db8b1af03)

**Core version**

OpenProject 16.5.0

**Browser**

*   [x] Chrome
*   [ ] Firefox
*   [ ] Safari
*   [ ] Mobile Safari
*   [ ] Other (please specify)

**Operating System**

*   [ ] Windows
*   [ ] Mac OS X
*   [ ] Mobile iOS
*   [ ] Mobile Android
*   [x] Linux (please specify distro)
*   [ ] Chrome OS
*   [ ] Other (please specify)
