I'm creating a new issue ala
https://developer.atlassian.com/jiradev/jira-apis/jira-rest-apis/jira-rest-api-tutorials/jira-rest-api-example-create-issue
and in createmeta
/rest/api/2/issue/createmeta?projectKeys=<project id>&issuetypeName=Bug&expand=projects.issuetypes.fields
I see customfield_10007 defined like this
"customfield_10007": {
"hasDefaultValue": false,
"name": "Epic Link",
"operations": [
"set"
],
"required": false,
"schema": {
"custom": "com.pyxis.greenhopper.jira:gh-epic-link",
"customId": 10007,
"items": "string",
"type": "array"
}
},
I look in
/rest/agile/1.0/board/<boardid>/epic
to find the <epicid> then look in
/rest/agile/1.0/epic/<epicid>
to confirm the <epicid> and the <epickey>.
I try setting that field to <epickey> when creating a new issue, but when I go look at the issue in the web interface, the 'Epic Link' is blank.
If I try setting that field to <epicid>, I get this error
Epic with key <epicid> does not exist.
You might want to try this out.
https://confluence.atlassian.com/jirakb/set-the-epic-link-via-rest-call-779158620.html
The id you are providing is that of the board, not the epic. Try and access the Epic via the rest API, and look at the ID value you get. Then try and use that id in your issue creation request.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When I look up the Epic via /rest/agile/1.0/board/<boardid>/epic to get the epic id, then /rest/agile/1.0/epic/<epicid> to confirm, and then use that id in the create issue, I get the error Epic with key <epicid> does not exist. (I've updated my question with this info to make it more clear) Sounds like I can't do this currently: https://jira.atlassian.com/browse/GHS-7017 but I can do it with a separate call: https://confluence.atlassian.com/display/JIRAKB/Set+the+%27Epic+Link%27+via+REST+call
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.