Defect #10358

REST API: Multiple query fields

Added by Markus Korber almost 3 years ago. Updated almost 3 years ago.

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

0%

Category:REST API
Target version:-
Resolution:Invalid Affected version:

Description

Hi,

using the REST API with two queries of the same type works for 'tracker_id' like this:

http://www.redmine.org/issues.xml?tracker_id=1&tracker_id=2
which returns all issues with id 1 or 2 but fails for 'created_on'
http://www.redmine.org/issues.xml?created_on=>=2012-03-01&created_on=<=2012-03-02
which returns all issues created before 2012-03-02. Any chance to fix this?

History

#1 Updated by Sridhar P almost 3 years ago

I can replicate this on trunk at rev 9245.

#2 Updated by Sridhar P almost 3 years ago

Sridhar P wrote:

I can replicate this on trunk at rev 9245.

Sorry, rev 9145

#4 Updated by Markus Korber almost 3 years ago

  • Status changed from New to Resolved
Thanks Etienne, this works as expected. Two more questions:
  • Is this somewhere in the docs?
  • Can we close #8842 too?

#5 Updated by Sridhar P almost 3 years ago

Updated the documentation, http://www.redmine.org/projects/redmine/wiki/Rest_Issues

When I try this url on my machine (with webrick), I am getting this error: ================================================================
Bad Request

bad URI `/issues.xml?created_on=%3E%3C2012-03-01|2012-03-02'. ================================================================

Is this expected with webrick?

#6 Updated by Etienne Massip almost 3 years ago

Sridhar P wrote:

Updated the documentation, http://www.redmine.org/projects/redmine/wiki/Rest_Issues

Thanks for that.

Is this expected with webrick?

No. Use the fully encoded form: http://www.redmine.org/issues.xml?created_on=%3E%3C2012-03-01%7C2012-03-02

#7 Updated by Etienne Massip almost 3 years ago

  • Status changed from Resolved to Closed
  • Resolution set to Invalid

Also available in: Atom PDF