Skip to content

OpenProject Filter Fix #4166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,8 @@ export class OpenProjectApiService {
url: `${cfg.host}/api/v3/projects/${cfg.projectId}/work_packages`,
params: {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately this will stop to work once you have more than 100 (pageSize) workPackages. Maybe there is a better way to fix this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will look into the filter API. I thought it is a cheap way. I'm not so into programming at the moment. I can read it and I learned it in my work, but I don't work as a developer. So I will try.

Copy link
Author

@19Topgun93 19Topgun93 Mar 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested a little and add the params with pagesize 100 and sortBy updatedAt. I haven't get the filters parameter working. The Search doesn't filter at all. But for me that is better, then it doesn't work at all. Maybe my understanding from the filter parameter is bad. I don't know. Maybe a Dev with more experience then I can make it.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your effort! Currently I am very busy with some other features, so someone else picking this up, would be very welcome!

pageSize: 100,
// see: https://www.openproject.org/docs/api/filters/
filters: JSON.stringify(
[
{ subjectOrId: { operator: '**', values: [searchText] } },
// only list open issues
{ status: { operator: 'o', values: [] } },
].concat(this._getScopeParamFilter(cfg)),
),
// Default: [["id", "asc"]]
sortBy: '[["updatedAt","desc"]]',
sortBy: '[["updatedAt", "desc"]]',
},
},
cfg,
Expand Down