プロジェクト

全般

プロフィール

Vote #79393

未完了

API: Issue Relation create does not work

Admin Redmine さんが約2年前に追加. 約2年前に更新.

ステータス:
Needs feedback
優先度:
通常
担当者:
-
カテゴリ:
REST API_32
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
32
version_id:
0
issue_org_id:
29128
author_id:
355438
assigned_to_id:
355438
comments:
5
status_id:
10
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Needs feedback]

説明

using postman /issues/15658/relations.json

with headers

  • Content-Type:application/json
  • X-Redmine-API-Key:...

and payload

{
    "relations": [
        {
            "issue_id":"15657",
            "relation_type":"follows",
            "delay": 0
        }
    ]
}

always returns 422 with error message

{
    "errors": [
        "Related issue cannot be blank"
    ]
}

what is wrong here, i tried mulitple structures. API documentation for issue relation is very unclear about that.


journals

Could you please change it as follows and try it out.
With my environment this worked out.

<pre>
{
"relation": {
"issue_to_id":"15657",
"relation_type":"follows",
"delay": 0
}
}
</pre>
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Yes it worked, but does that mean, i cannot add multiple relations with one shot? looking at the api doc it looks like it is handling arrays of relations.

Thanks
--------------------------------------------------------------------------------
Thank you for your confirmation.
I read the code, but the current Issue Relation create API seems not to support to multiple structures.

Eser Esen wrote:
> Yes it worked, but does that mean, i cannot add multiple relations with one shot? looking at the api doc it looks like it is handling arrays of relations.
Could you tell me the URL of the api document it looks like it is handling arrays of relations? I could not find it.

Also, I thought that the title of this issue was better for "API: Multiple Issue Relation create does not work".
--------------------------------------------------------------------------------
Hi the URL is https://www.redmine.org/projects/redmine/wiki/Rest_IssueRelations

Looking at it again, the GET method actually returns arrays, while the POST one fits to the one you provided.

Would be good, if someone could add xml/json examples.
--------------------------------------------------------------------------------

Admin Redmine さんが約2年前に更新

  • カテゴリREST API_32 にセット

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

いいね!0
いいね!0