Patch #12746

Add include=journals support to issues REST api

Added by Derek Slone-Zhen over 9 years ago. Updated almost 4 years ago.

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

0%

Category:REST API
Target version:-

Description

To see what has changed on an issue it seems necessary to obtain the history of journal objects that are associated with the issue. I was trying to do this through the REST API and discovered that I could get the journals for a SINGLE issue by adding "include=journals" as a query argument, but that it appeared to be ignored when used on the issues index. I coded my way around this client side by requesting each issue individually to get around this, but it seemed inefficient. So, attached is a patch that will add this functionality into app/views/issues/index.api.rsb.

This was made against svn+ssh://rubyforge.org/var/svn/redmine/trunk@11110

This is my first Open Source contribution and my first venture into Ruby and Rails - I'm open to polite coaching if required!

Add include=journals support to issues REST api.diff Magnifier (1.41 KB) Derek Slone-Zhen, 2013-01-05 12:05


Related issues

Related to Redmine - Defect #35242: Journals are not returned via API Closed

History

#1 Updated by Jean-Philippe Lang over 9 years ago

While I understand your concern, I'm not really in favor of this change as it can lead to huge API responses.

#2 Updated by Derek Slone-Zhen over 9 years ago

Thanks for the feedback.

A part of me just thinks that being able to ask for it makes sense, and that people need to be 'trusted' as to wheather or not to use the feature.

Another option that I was toying with was to implement (at least for the REST API) an /issues/<id>/journals.xml route. Would you be more sympathetic to that?

#3 Updated by Bubi = almost 4 years ago

When you need to download journals for the listed issues the only alternative is to call the API with every issue.
We have also to consider that we are speaking about trusted API users so I think that the suggested implementation could be a good solution.

#4 Updated by Holger Just 12 months ago

  • Related to Defect #35242: Journals are not returned via API added

Also available in: Atom PDF