Rest Api: filter by issue category
It would be really nice to allow filtering issues by their assigned issue category.
Perhaps the filter could be expanded to allow matching string searches? Similar to when searching for sub-strings in custom fields.
Updated by Holger Just about 2 years ago
- Status changed from New to Needs feedback
You can filter issues by their assigned numeric
category_id right now. This should work exactly as shown in your first example. See Rest_Issues.
To get a list of possible category IDs, you can use the categories API first to fetch all categories and select the ones you are interested in to use in your issue filter. This allows you to implement your second use-case with two queries.
In case this is not working for you, please provide more details, i.e. a reproducible data set, your specific query, and the exact behavior you are seeing. If possible, please also provide full logs of the request.
Updated by Aed Art about 2 years ago
The only viable details I can deliver to you is that I'm using a Redmine version 4.x. Thus, not yet the latest version of Redmine.
Sadly, when I attempted to what you wrote, I received an unexpected list of issues, containing all the assigned categories and not just the one that I was trying to filter by.
Updated by Jon Schell about 1 year ago
I'm using 4.2.1 and I have this problem. When querying the entire issue list for all projects, I can't filter by category. Also, when filtering a project where that category doesn't exist, the query returns all issues.
The expected / desired behavior is that I can query either all projects or just one project with Category as a filter, and if the project doesn't have that category, then it returns no issues.