Project

General

Profile

Actions

Feature #10828

open

Request multiple distinct values including issue id, parent_id, root_id

Added by Jeffrey Clark almost 12 years ago. Updated almost 9 years ago.

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

0%

Estimated time:
Resolution:

Description

Patch is intended to reduce the need for multiple issues requests and provide granular issue tree lookups (parent_id / root_id)

For example, instead of three requests:

/issues.xml?tracker_id=2
/issues.xml?tracker_id=6
/issues.xml?tracker_id=7

You can do:

/issues.xml?tracker_id=2|6|7

Changes

Query Model:
  • Extends integer equality, converts array of values to 'IN' sql.
Issues Controller:
  • Support 'id', 'root_id', 'parent_id' params.

Files

restapi-issues-id-param.patch (1.63 KB) restapi-issues-id-param.patch Jeffrey Clark, 2012-05-03 22:01

Related issues

Related to Redmine - Feature #6118: Filter by parent task or subtasksClosedJean-Philippe Lang2010-08-12

Actions
Related to Redmine - Feature #10259: Allow getting a list of issues by ID through the APIClosed

Actions
Related to Redmine - Feature #10763: REST-API: Please add "parent_issue_id" as filter for requests to filter out subticketsClosed

Actions
Actions #2

Updated by Markus M over 11 years ago

Is this patch going to become part of an official release of redmine?

I assume, with this patch, the following GET will work? http://demo.redmine.org/issues.xml?id=2521|4456

To be consistent with the rest of the API you might want to change the seperator from "|" to ",". That's how the redmine API works for ?inculde=journals,changesets

Related use case: http://www.redmine.org/issues/10259

Actions #3

Updated by Markus M over 11 years ago

  • Assignee set to Jean-Philippe Lang

Please consider to add the patch to a release.

Actions #4

Updated by Hannes Meier over 11 years ago

+1

and would resolve #10763

Actions #5

Updated by Thomas Lmx over 11 years ago

+1
It resolves the Feature #6118 with the API

Actions #6

Updated by Toshi MARUYAMA over 10 years ago

  • Related to Feature #6118: Filter by parent task or subtasks added
Actions #7

Updated by Toshi MARUYAMA over 10 years ago

  • Related to Feature #10259: Allow getting a list of issues by ID through the API added
Actions #8

Updated by Toshi MARUYAMA over 10 years ago

  • Related to Feature #10763: REST-API: Please add "parent_issue_id" as filter for requests to filter out subtickets added
Actions #9

Updated by Ieuan Jenkins almost 9 years ago

Markus M wrote:

To be consistent with the rest of the API you might want to change the seperator from "|" to ",". That's how the redmine API works for ?inculde=journals,changesets

I'd argue this is slightly different and the vertical bar is correct here: it follows similar functionality to the existing API query for Assignee, which would be something like: issues.json?assigned_to_id=6|7

I'm not sure the restapi-issues-id-param.patch patch is quite appropriate though, it updates the main issues_controller.rb to add in the additional filter parameters whereas all other filtering is done in the issue_query.rb.

I'm not up to speed on ruby myself but I'll try to take a look and see if it can be implemented there in the same way as the assigned_to_id parameter does.

Actions

Also available in: Atom PDF