Project

General

Profile

Actions

Feature #37167

closed

REST API: Filter issues by multiple tracker ids

Added by Ko Nagase almost 2 years ago. Updated 14 days ago.

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

0%

Estimated time:
Resolution:
Wont fix

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

Actions #2

Updated by Marius BĂLTEANU over 1 year ago

  • Target version set to Candidate for next major release
Actions #3

Updated by Marius BĂLTEANU about 1 month 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?

Actions #4

Updated by Marius BĂLTEANU about 1 month ago

This is available for all fields that support "is" operator, not only for tracker_id.

Actions #5

Updated by Marius BĂLTEANU 17 days 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.

Actions #6

Updated by Ko Nagase 14 days 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 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!

Actions #7

Updated by Marius BĂLTEANU 14 days 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.

Actions

Also available in: Atom PDF