Feature #8842

REST API: Filter issues created/updated before or after specific timestamp

Added by Jens Bäckman almost 7 years ago. Updated over 4 years ago.

Status:ClosedStart date:2011-07-18
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:REST API
Target version:2.5.0
Resolution:Fixed

Description

The current REST API allows for simple extraction of issue details and such things. For developing a more advanced client, keeping track of a very large Redmine issue list, it's not really enough. Yes, you can simply fetch the entire issue list, but that's barbaric and evil. So why not implement a new filter, allowing the database do all of the hard work for us?

GET /issues.xml?from=20110507T174311

I'm quite proud of this myself. Doesn't put unneeded stress on the server if an app is fetching the entire issue list every few seconds, and allows smart external tools to skip XML parsing of a huge amount of non-updated issues. The same filter could also be added to projects, versions, relations and so on. Or maybe a combined feed where you would get them all.


Related issues

Related to Redmine - Defect #15780: Filter issues by date time (instead of only date) in REST... Closed

Associated revisions

Revision 12477
Added by Jean-Philippe Lang over 4 years ago

Allow filtering with timestamp (#8842).

Revision 12478
Added by Jean-Philippe Lang over 4 years ago

Fixed test failure with sqlite (#8842).

Revision 12479
Added by Jean-Philippe Lang over 4 years ago

Fixed test failure with ruby1.8 (#8842).

Revision 12480
Added by Jean-Philippe Lang over 4 years ago

Fixed assertion for postgresql and sqlite (#8842).

History

#1 Updated by Markus Korber over 6 years ago

+1

#2 Updated by Etienne Massip about 6 years ago

You can already use

GET /issues.xml?updated_on=>=2012-03-07
.

#3 Updated by Jens Bäckman about 6 years ago

Hmm... That's not mentioned in the Rest API wiki page for Issues.
http://www.redmine.org/projects/redmine/wiki/Rest_Issues

#4 Updated by Alex Last about 6 years ago

what about "issues created after", not just "updated on"?

actually, then best approach would be to retrieve "redmine server activity" with all (or some filtered) events within certain time period.
e.g. "show me what happened since Jan 1st" or "show me what happened with issues since Jan 1st. this info is crucial for Redmine-Redmine sync, which was requested by several people.
I submitted #10402 about this.

#5 Updated by Jeffrey Clark almost 6 years ago

Not sure when this was added, but you can do:

/issues.xml?created_on=><2012-03-01|2012-03-07

#6 Updated by Oleksandr Melnyk over 4 years ago

You can already use
GET /issues.xml?updated_on=>=2012-03-07

Yes, but it doesn't accept time eg. updated_on=>=2013-11-06T19:59:05Z. And it crucial when developing, for example, synchronization functionality.

#7 Updated by Toshi MARUYAMA over 4 years ago

  • Related to Defect #15780: Filter issues by date time (instead of only date) in REST API added

#8 Updated by Jean-Philippe Lang over 4 years ago

  • Subject changed from REST API: Filter issues updated after specific timestamp to REST API: Filter issues created/updated before or after specific timestamp
  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Target version set to 2.5.0
  • Resolution set to Fixed

Feature added in r12477. Using a from parameter, you'll have to use the regular syntax with a timestamp instead of a date (see examples in Rest_Issues).

Also available in: Atom PDF