Feature #37167
closed
REST API: Filter issues by multiple tracker ids
Added by Ko Nagase over 2 years ago.
Updated 9 months ago.
Description
Currently, filtering issues by multiple tracker ids is possible with analyzing issues query filter.
But building above URL path is not strait forward, and it's preferable to support like the following understandable parameter.
Attached patch file enables above simple and understandable multiple tracker ids filter issues request.
Note that this patch was made by @rbt, Takashi Kato, @mbasa and me from Redmine patch meetup 14th.
Files
- Target version set to Candidate for next major release
- Status changed from New to Needs feedback
- Target version deleted (
Candidate for next major release)
Indeed, the long syntax is not so user friendly, but you can use the short filters. For example, the same behaviour can be obtained using the following query: issues.json?tracker_id=2|3
which will return all issues with tracker_id=2
or tracker_id=3
. The delimiter operator is "|" and not ",".
Can you test and let me know if it works for you?
This is available for all fields that support "is" operator, not only for tracker_id
.
- Tracker changed from Patch to Feature
- Status changed from Needs feedback to Closed
- Resolution set to Wont fix
Closing this.
Ko Nagase, please reopen if the current implementation does not cover your requirements.
Marius BĂLTEANU wrote in #note-3:
Indeed, the long syntax is not so user friendly, but you can use the short filters. For example, the same behaviour can be obtained using the following query: issues.json?tracker_id=2|3
which will return all issues with tracker_id=2
or tracker_id=3
. The delimiter operator is "|" and not ",".
Can you test and let me know if it works for you?
Sorry for the late reply.
I confirmed that "|" works as expected.
Probably, the following add_short_filter
seems to be the trick ?
https://www.redmine.org/projects/redmine/repository/svn/entry/trunk/app/models/query.rb#L734
Anyway, thanks for the information!
Also available in: Atom
PDF