https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292022-05-27T14:06:02ZRedmineRedmine - Feature #37167: REST API: Filter issues by multiple tracker idshttps://www.redmine.org/issues/37167?journal_id=1068012022-05-27T14:06:02ZKo Nagase
<ul><li><strong>File</strong> <a href="/attachments/29241">0001-rest-api-filter-issues-by-multiple-tracker-ids.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/29241/0001-rest-api-filter-issues-by-multiple-tracker-ids.patch">0001-rest-api-filter-issues-by-multiple-tracker-ids.patch</a> added</li></ul> Redmine - Feature #37167: REST API: Filter issues by multiple tracker idshttps://www.redmine.org/issues/37167?journal_id=1070002022-06-19T20:11:25ZMarius BĂLTEANU
<ul><li><strong>Target version</strong> set to <i>Candidate for next major release</i></li></ul> Redmine - Feature #37167: REST API: Filter issues by multiple tracker idshttps://www.redmine.org/issues/37167?journal_id=1124682024-01-24T03:04:11ZMarius BĂLTEANU
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Needs feedback</i></li><li><strong>Target version</strong> deleted (<del><i>Candidate for next major release</i></del>)</li></ul><p>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: <code>issues.json?tracker_id=2|3</code> which will return all issues with <code>tracker_id=2</code> or <code>tracker_id=3</code>. The delimiter operator is "|" and not ",".</p>
<p>Can you test and let me know if it works for you?</p> Redmine - Feature #37167: REST API: Filter issues by multiple tracker idshttps://www.redmine.org/issues/37167?journal_id=1124692024-01-24T03:04:38ZMarius BĂLTEANU
<ul></ul><p>This is available for all fields that support "is" operator, not only for <code>tracker_id</code>.</p> Redmine - Feature #37167: REST API: Filter issues by multiple tracker idshttps://www.redmine.org/issues/37167?journal_id=1128892024-02-10T10:36:13ZMarius BĂLTEANU
<ul><li><strong>Tracker</strong> changed from <i>Patch</i> to <i>Feature</i></li><li><strong>Status</strong> changed from <i>Needs feedback</i> to <i>Closed</i></li><li><strong>Resolution</strong> set to <i>Wont fix</i></li></ul><p>Closing this.</p>
<p><a class="user active" href="https://www.redmine.org/users/388654">Ko Nagase</a>, please reopen if the current implementation does not cover your requirements.</p> Redmine - Feature #37167: REST API: Filter issues by multiple tracker idshttps://www.redmine.org/issues/37167?journal_id=1129092024-02-13T13:29:27ZKo Nagase
<ul></ul><p>Marius BĂLTEANU wrote in <a href="#note-3">#note-3</a>:</p>
<blockquote>
<p>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: <code>issues.json?tracker_id=2|3</code> which will return all issues with <code>tracker_id=2</code> or <code>tracker_id=3</code>. The delimiter operator is "|" and not ",".</p>
<p>Can you test and let me know if it works for you?</p>
</blockquote>
<p>Sorry for the late reply.<br />I confirmed that "|" works as expected.<br />Probably, the following <code>add_short_filter</code> seems to be the trick ?<br /><a class="external" href="https://www.redmine.org/projects/redmine/repository/svn/entry/trunk/app/models/query.rb#L734">https://www.redmine.org/projects/redmine/repository/svn/entry/trunk/app/models/query.rb#L734</a></p>
<p>Anyway, thanks for the information!</p> Redmine - Feature #37167: REST API: Filter issues by multiple tracker idshttps://www.redmine.org/issues/37167?journal_id=1129102024-02-13T21:50:00ZMarius BĂLTEANU
<ul></ul><p>Ko Nagase wrote in <a href="#note-6">#note-6</a>:</p>
<blockquote>
<p>Probably, the following <code>add_short_filter</code> seems to be the trick ?<br /><a class="external" href="https://www.redmine.org/projects/redmine/repository/svn/entry/trunk/app/models/query.rb#L734">https://www.redmine.org/projects/redmine/repository/svn/entry/trunk/app/models/query.rb#L734</a></p>
</blockquote>
<p>Yes, that it is.</p>