Content
Updated by Wieland Lindenthal 4 months ago
### Debugging info
<mention class="mention" data-id="77888" data-type="user" data-text="@Sagar Gurung">@Sagar Gurung</mention> The OpenProject API endpoint `/api/v3/work_packages/available_projects` caps to either 5 or 10 projects unless you add the URL parameter `pageSize=-1`, which makes it unlimited. However, it is not truly unlimited as all our API endpoints cap hard at some 1000 or 2000 elements in a collection. And if OpenProject has more than 2000 projects (very likely to happen), then the current approach of the Nextcloud app to load all projects at once will not work anymore. We need to have a solution where updating the search term, so making it more specific, will trigger a full new request. And then you can set the page size to something more reasonable, e.g 50.
### Steps to reproduce (a bit tricky. The following steps are not perfect)
1. In OpenProject, have more than 10 projects with every project having the same Nextcloud file storage activated.
2. On a file in Nextcloud open the "OpenProject" tab.
3. Click on "Search for work package to create a relation"
4. Click on "Click and link a new work package"
5. In the modal that opens, open the project drop down
6. Type a part of the project name
### What is the buggy behavior?
* There are only max 5 or 10 options or less shown (the number depends on the OpenProject version) while the one I am searching for is not in i
### What is the expected behavior?
1. If the expected project name should be in the list and is specific enough, then it should be in the list
###
<mention class="mention" data-id="77888" data-type="user" data-text="@Sagar Gurung">@Sagar Gurung</mention> The OpenProject API endpoint `/api/v3/work_packages/available_projects` caps to either 5 or 10 projects unless you add the URL parameter `pageSize=-1`, which makes it unlimited. However, it is not truly unlimited as all our API endpoints cap hard at some 1000 or 2000 elements in a collection. And if OpenProject has more than 2000 projects (very likely to happen), then the current approach of the Nextcloud app to load all projects at once will not work anymore. We need to have a solution where updating the search term, so making it more specific, will trigger a full new request. And then you can set the page size to something more reasonable, e.g 50.
### Steps to reproduce (a bit tricky. The following steps are not perfect)
1. In OpenProject, have more than 10 projects with every project having the same Nextcloud file storage activated.
2. On a file in Nextcloud open the "OpenProject" tab.
3. Click on "Search for work package to create a relation"
4. Click on "Click and link a new work package"
5. In the modal that opens, open the project drop down
6. Type a part of the project name
### What is the buggy behavior?
* There are only max 5 or 10 options or less shown (the number depends on the OpenProject version) while the one I am searching for is not in i
### What is the expected behavior?
1. If the expected project name should be in the list and is specific enough, then it should be in the list
###