Feature #5305

"related issues" info is required in XML data

Added by Alex Last over 9 years ago. Updated almost 5 years ago.

Status:Needs feedbackStart date:2010-04-13
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:REST API
Target version:-
Resolution:

Description

basic XML data produced by REST API should include "Related issues" info.
e.g.: id and name of blocking tasks.

this is required to build proper dependency tree for imported data.


Related issues

Related to Redmine - Feature #1214: REST API for Issues Closed 2008-05-08
Related to Redmine - Feature #7366: REST API for Issue Relations Closed 2011-01-19

Associated revisions

Revision 3729
Added by Jean-Philippe Lang over 9 years ago

Adds issue relations to individual issue XML (#5305).

History

#1 Updated by Eric Davis over 9 years ago

This should be added part of the individual issue's API. (e.g. /issues/123.xml)

#2 Updated by Alex Last over 9 years ago

I agree it makes more sense to do it that way, but it means that I'd have to perform 500 individual requests if I load 500 issues in my redmine->MSP importer - which kind of sucks.
maybe the REST API can do SQL join to provide the same info in "issues list" response if some "load_linked_issues_info" parameter is specified in the request?

#3 Updated by Eric Davis over 9 years ago

I'd rather keep the API simple and not add a bunch of non-field options.

What I was thinking about was adding some counter fields to issues. So you can see <related-issues-count>0</related-issues-count> and know you wouldn't need to fetch the main issues' XML. This could also speed up a few other things in Redmine (counter cache)

#4 Updated by Alex Last over 9 years ago

that would work too.

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

Relations added to the individual issue XML output in r3729.

Concerning counter cache, remember that it doesn't take care of issue visibilty. If it's 0, we know that there is no related issue. But if it's > 0, we still have to count related issues that are visible to the user.

#6 Updated by Alex Last over 9 years ago

Eric Davis wrote:

I'd rather keep the API simple and not add a bunch of non-field options.

What I was thinking about was adding some counter fields to issues. So you can see <related-issues-count>0</related-issues-count> and know you wouldn't need to fetch the main issues' XML. This could also speed up a few other things in Redmine (counter cache)

I tried the last trunk version. It provides the related issues list in "issue.xml" - good! would be nice to have that <related-issues-count>0</related-issues-count> added to "issues list" response.
thanks, Eric.

btw, is there a chance to integrate those changes into 0.9 branch so we could get them in the next release (0.9.5)? it looks safe for me, although I'm not a redmine developer, of course.
Alex.

#7 Updated by Eric Davis over 9 years ago

Jean-Philippe Lang wrote:

Concerning counter cache, remember that it doesn't take care of issue visibilty. If it's 0, we know that there is no related issue. But if it's > 0, we still have to count related issues that are visible to the user.

Good point, caching that would be a bad idea.

#8 Updated by Alex Last about 8 years ago

any plans to allow manipulating relations via REST API (feature #7366)?

#9 Updated by Laurent Girard almost 5 years ago

+1

#10 Updated by Toshi MARUYAMA almost 5 years ago

  • Status changed from New to Needs feedback

I think we can close this issue.
What is problem?

Also available in: Atom PDF