Content
View differences
Updated by Wieland Lindenthal 5 days ago
### 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` `/work_packages/auto_complete.json?q=free&scope=all`
### 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)
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)