プロジェクト

全般

プロフィール

Vote #69018

完了

REST API for Issue Relations

Admin Redmine さんがほぼ4年前に追加. ほぼ4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
REST API_32
対象バージョン:
開始日:
2011/01/19
期日:
進捗率:

80%

予定工数:
category_id:
32
version_id:
36
issue_org_id:
7366
author_id:
25548
assigned_to_id:
0
comments:
13
status_id:
5
tracker_id:
2
plus1:
1
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

There is no Rest API for create, update, delete und select issue relations.


journals

+1
--------------------------------------------------------------------------------
+2
--------------------------------------------------------------------------------
+3
--------------------------------------------------------------------------------
REST API provides list of existing relations (#5305).

sample: http://mushroom:3000/issues/24580.xml?include=relations

<issue>
<id>24580</id>
<project name="project number 1296286327740" id="120"/>
<tracker name="Bug" id="1"/>
<status name="New" id="1"/>
<priority name="Normal" id="4"/>
<author name="Redmine Admin" id="1"/>
<subject>task 1</subject>
<description/>
<start_date>2011-07-13</start_date>
<due_date/>
<done_ratio>0</done_ratio>
<estimated_hours/>
<spent_hours>0.0</spent_hours>
<custom_fields type="array">
<custom_field name="my_custom_1" id="1">
<value/>
</custom_field>
<custom_field name="custom_boolean_1" id="2">
<value>0</value>
</custom_field>
</custom_fields>
<created_on>2011-06-30T23:06:27-07:00</created_on>
<updated_on>2011-06-30T23:07:28-07:00</updated_on>
<relations type="array">
<relation delay="" id="2" relation_type="blocks" issue_id="24581"/>
</relations>
</issue>
--------------------------------------------------------------------------------
Added in r6176. See [[Rest_IssueRelations]].
--------------------------------------------------------------------------------
Excellent! Thank you very much, Jean-Philippe.
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.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
http://mushroom:3030/issues.xml?limit=25&project_id=test&offset=0&include=relations

- does NOT include relations. this only works for a particular issue, not for "get issues" request.
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.
this is not good

--------------------------------------------------------------------------------
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).
This is an important feature for data import-export between Redmine and MSProject.

--------------------------------------------------------------------------------
Added in r6313. You can now use @/issues?include=relations@.
--------------------------------------------------------------------------------
I see 1 problem with the implementation: both "forward" and "Reverse" relations are the same:
e.g. I have issues 1 and 2, 1 precedes 2.

I'd expect relations on 1 to say:
> "id=.. issue_id=1 issue_to_id=2 type=precedes"

and the relation on 2:
> "id=.. issue_id=2 issue_to_id=1 type=follows"

but what Redmine returns now is exactly the same relation text for both issues 1 and 2.

--------------------------------------------------------------------------------
here's a sample XML file to illustrate the problem
--------------------------------------------------------------------------------
Alexey Skor wrote:
> I see 1 problem with the implementation: both "forward" and "Reverse" relations are the same

Yes, that's because "they" are the same (look at their id), there's only one relation between 2 issues.
Delete one and "the other" will be deleted.
--------------------------------------------------------------------------------


related_issues

relates,Closed,5305,"related issues" info is required in XML data

Admin Redmine さんがほぼ4年前に更新

  • カテゴリREST API_32 にセット
  • 対象バージョン1.3.0_36 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0