Defect #29521

REST API: Filtering issues by issue_id does not work as the documentation suggests

Added by James Ferguson almost 4 years ago. Updated almost 4 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Documentation
Target version:-
Resolution:Fixed Affected version:

Description

the documentation for issues here (http://www.redmine.org/projects/redmine/wiki/Rest_Issues) states that there is an optional filter to filter by one or multiple issue ids:
"issue_id: get issue with the given id or multiple issues by id using ',' to separate id."

I've been unable to get this to work in any form and the documentation seems to be incorrect, here are some example requests using this very database and a few valid issues ids (320, 9000 and 12002):

http://www.redmine.org/issues.json?id=9000&limit=1
http://www.redmine.org/issues.json?id=320,12002&limit=2

if you follow those links in the browser you'll notice you also get incorrect results, it seems to just return issues from either the very start or very end of the issue list and not the ids that were actually requested. This is unfortunate because otherwise to retrieve the journals for multiple issues I need to make multiple requests using issues/id.json?inlcude=journals rather than being able to batch them together as the documentation suggests with issues.json?id=1,2,3,4,5&include=journals

I'm not sure which version of redmine the database at www.redmine.org is using but this is what I've been testing against


Related issues

Related to Redmine - Defect #25400: Documentation for Rest API issue listing seems incorrect Closed

History

#1 Updated by James Ferguson almost 4 years ago

the examples use:

/issues.xml?id=1
/issues.xml?id=1,2

but they also mention 'issue_id' rather than 'id' - "issue_id: get issue with the given id or multiple issues by id using ',' to separate id."

the examples from my description using issue_id in place of id also don't work:

http://www.redmine.org/issues.json?issue_id=9000&limit=1
http://www.redmine.org/issues.json?issue_id=320,12002&limit=2

#2 Updated by Go MAEDA almost 4 years ago

  • Category changed from REST API to Documentation
  • Status changed from New to Closed
  • Resolution set to Fixed

Thank you for pointing out the errors in the document. I have fixed it.
https://www.redmine.org/projects/redmine/wiki/Rest_Issues/diff?utf8=%E2%9C%93&version=63&version_from=62&commit=View+differences

But the issue_id parameter does not work on www.redmine.org because it was added in Redmine 3.3 (#4806) and redmine.org uses an older version of Redmine.

#3 Updated by Go MAEDA almost 4 years ago

  • Related to Defect #25400: Documentation for Rest API issue listing seems incorrect added

Also available in: Atom PDF