https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292011-02-11T06:01:02ZRedmineRedmine - Feature #7366: REST API for Issue Relationshttps://www.redmine.org/issues/7366?journal_id=250982011-02-11T06:01:02ZRedminePro Yang
<ul></ul><p>+1</p> Redmine - Feature #7366: REST API for Issue Relationshttps://www.redmine.org/issues/7366?journal_id=291192011-05-23T07:19:02ZDmitry Ustyuzhanin
<ul></ul><p>+2</p> Redmine - Feature #7366: REST API for Issue Relationshttps://www.redmine.org/issues/7366?journal_id=304372011-07-01T23:08:25ZAlex Last
<ul></ul><p>+3</p> Redmine - Feature #7366: REST API for Issue Relationshttps://www.redmine.org/issues/7366?journal_id=304392011-07-01T23:10:55ZAlex Last
<ul></ul><p>REST API provides list of existing relations (<a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: "related issues" info is required in XML data (Closed)" href="https://www.redmine.org/issues/5305">#5305</a>).</p>
<p>sample: <a class="external" href="http://mushroom:3000/issues/24580.xml?include=relations">http://mushroom:3000/issues/24580.xml?include=relations</a></p>
<p><issue><br /><id>24580</id><br /><project name="project number 1296286327740" id="120"/><br /><tracker name="Bug" id="1"/><br /><status name="New" id="1"/><br /><priority name="Normal" id="4"/><br /><author name="Redmine Admin" id="1"/><br /><subject>task 1</subject><br /><description/><br /><start_date>2011-07-13</start_date><br /><due_date/><br /><done_ratio>0</done_ratio><br /><estimated_hours/><br /><spent_hours>0.0</spent_hours><br /><custom_fields type="array"><br /><custom_field name="my_custom_1" id="1"><br /><value/><br /></custom_field><br /><custom_field name="custom_boolean_1" id="2"><br /><value>0</value><br /></custom_field><br /></custom_fields><br /><created_on>2011-06-30T23:06:27-07:00</created_on><br /><updated_on>2011-06-30T23:07:28-07:00</updated_on><br /><relations type="array"><br /><relation delay="" id="2" relation_type="blocks" issue_id="24581"/><br /></relations><br /></issue></p> Redmine - Feature #7366: REST API for Issue Relationshttps://www.redmine.org/issues/7366?journal_id=305092011-07-04T17:51:12ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Resolved</i></li><li><strong>Target version</strong> set to <i>1.3.0</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>80</i></li></ul><p>Added in <a class="changeset" title="Adds REST API for issue relations (#7366)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/6176">r6176</a>. See <a class="wiki-page" href="https://www.redmine.org/projects/redmine/wiki/Rest_IssueRelations">Rest_IssueRelations</a>.</p> Redmine - Feature #7366: REST API for Issue Relationshttps://www.redmine.org/issues/7366?journal_id=305102011-07-04T18:21:53ZAlex Last
<ul></ul><p>Excellent! Thank you very much, Jean-Philippe. <br />Having this API is crucial for proper MSProject-Redmine synchronization support. I hope now can properly save "predecessors" info from a Microsoft Project file into Redmine and then retrieve this info back.</p> Redmine - Feature #7366: REST API for Issue Relationshttps://www.redmine.org/issues/7366?journal_id=305122011-07-04T19:36:49ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Subject</strong> changed from <i>Rest API for issue relations</i> to <i>REST API for Issue Relations</i></li></ul> Redmine - Feature #7366: REST API for Issue Relationshttps://www.redmine.org/issues/7366?journal_id=309782011-07-22T03:22:24ZAlex Last
<ul></ul><p><a class="external" href="http://mushroom:3030/issues.xml?limit=25&project_id=test&offset=0&include=relations">http://mushroom:3030/issues.xml?limit=25&project_id=test&offset=0&include=relations</a></p>
<p>- does NOT include relations. this only works for a particular issue, not for "get issues" request.<br />which means if I have 100 issues to load from Redmine, I need to perform 100+1 REST API requests to Redmine to check if those tasks have any relations.<br />this is not good</p> Redmine - Feature #7366: REST API for Issue Relationshttps://www.redmine.org/issues/7366?journal_id=310022011-07-23T05:16:18ZAlex Last
<ul></ul><p>at least the issues list should include number of relations for every task, so that if it's not == 0, I'd load them for that particular task (instead of trying to query every single task).<br />This is an important feature for data import-export between Redmine and MSProject.</p> Redmine - Feature #7366: REST API for Issue Relationshttps://www.redmine.org/issues/7366?journal_id=310462011-07-24T15:36:29ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>Added in <a class="changeset" title="Ability to load relations on /issues API (#7366)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/6313">r6313</a>. You can now use <code>/issues?include=relations</code>.</p> Redmine - Feature #7366: REST API for Issue Relationshttps://www.redmine.org/issues/7366?journal_id=310552011-07-25T01:16:05ZAlex Last
<ul></ul><p>I see 1 problem with the implementation: both "forward" and "Reverse" relations are the same:<br />e.g. I have issues 1 and 2, 1 precedes 2.</p>
<p>I'd expect relations on 1 to say:</p>
<blockquote>
<p>"id=.. issue_id=1 issue_to_id=2 type=precedes"</p>
</blockquote>
<p>and the relation on 2:</p>
<blockquote>
<p>"id=.. issue_id=2 issue_to_id=1 type=follows"</p>
</blockquote>
<p>but what Redmine returns now is exactly the same relation text for both issues 1 and 2.</p> Redmine - Feature #7366: REST API for Issue Relationshttps://www.redmine.org/issues/7366?journal_id=310562011-07-25T01:18:58ZAlex Last
<ul><li><strong>File</strong> <a href="/attachments/6338">sample_relations.xml</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/6338/sample_relations.xml">sample_relations.xml</a> added</li></ul><p>here's a sample XML file to illustrate the problem</p> Redmine - Feature #7366: REST API for Issue Relationshttps://www.redmine.org/issues/7366?journal_id=311902011-07-31T09:23:21ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul><p>Alexey Skor wrote:</p>
<blockquote>
<p>I see 1 problem with the implementation: both "forward" and "Reverse" relations are the same</p>
</blockquote>
<p>Yes, that's because "they" are the same (look at their id), there's only one relation between 2 issues.<br />Delete one and "the other" will be deleted.</p>