Project

General

Profile

Actions

Feature #35843

open

Rest Api: filter by issue category

Added by Aed Art over 2 years ago. Updated over 1 year ago.

Status:
Needs feedback
Priority:
Normal
Assignee:
-
Category:
REST API
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:

Description

It would be really nice to allow filtering issues by their assigned issue category.

E.g.:

/issues.json?category_id=1234

Perhaps the filter could be expanded to allow matching string searches? Similar to when searching for sub-strings in custom fields.

/issues.json?category_id=~some-category-search-string
Actions #1

Updated by Holger Just over 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.

Actions #2

Updated by Aed Art over 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.

Actions #3

Updated by Jon Schell over 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.

Actions

Also available in: Atom PDF