Feature #37167
closedREST API: Filter issues by multiple tracker ids
0%
Description
- http://localhost:3000/issues.json?tracker_id=1,2,3
- (On current trunk, this request returns 500 Internal Server Error)
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
Updated by Ko Nagase about 2 years ago
Updated by Marius BĂLTEANU about 2 years ago
- Target version set to Candidate for next major release
Updated by Marius BĂLTEANU 7 months ago
- 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?
Updated by Marius BĂLTEANU 7 months ago
This is available for all fields that support "is" operator, not only for tracker_id
.
Updated by Marius BĂLTEANU 6 months ago
- 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.
Updated by Ko Nagase 6 months ago
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 withtracker_id=2
ortracker_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!
Updated by Marius BĂLTEANU 6 months ago
Ko Nagase wrote in #note-6:
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
Yes, that it is.