I am trying to automatically add a parent to an issue as soon as it is created.I use the advanced field editing but it seems that my syntax is not correct.I tried it like this:{ "fields": { "parent": "CRQ-33" }}
Hi @Jonas van Ravenstein ,
Are you trying to link an issue when it is created? If so you may need to check for issue linking functionality
{"update": { "issuelinks": [ { "add": { "type": { "name": "Relates" }, "outwardIssue": { "key": "{{issue.key}}" } } } ] } }
.
https://support.atlassian.com/jira-software-cloud/docs/advanced-field-editing-json/
You can check the issue's meta data with restapi call to use the correct field.
Hi @Niranjan,thanks for your reply.I don't know if thats the way to add a parent to an issue.That looks like the way to link a ticket to another ticket by relation type.Where adding a parent to an issue is more like assigning an epic to the ticket but somehow not quite the same.In the automation rule one can use the "Edit issue" action which can be used to set ticket fields. In the default field list there is even the field "Epic Link", but selecting that, the following dropdown displaying the Epics do not contain the ticket I want to assign as a parent.So if that option you mentioned is usable, do you know the type of relation you would have to set there?Thanks!
I tried it like this, but that did not work as there is no issue link type like "Parent" or "Child".
{"update": { "issuelinks": [ { "add": { "type": { "name": "Parent" }, "outwardIssue": { "key": "CRQ-33" } } } ] } }
Check for the available link types in your project. There are different options.
You can create an Epic and link other issue types with "Epic Link" field(This field is to be added to the standard issue type screen). You need to provide the issue key of the Epic in the Epic Link field.
Second linking is creating a sub-task. Here you can associate a sub-task issue type to a standard issue type.
And if the link types "is parent of", "is child of" is unavailable, then you can ask the JIRA admin to create it.
Apart from these, there is a "parent Link" field in advanced roadmaps(portfolio for jira). I am unsure if you are trying to update that field. There is a bug with restapi update of this field
https://jira.atlassian.com/browse/JRASERVER-65921?
I'm also trying to do this super simple thing, but just can't get it to work. Any update here?
I was also fighting this; turns out it was a lot easier than I was making it:
Yes! This worked like a charm. Make sure you specify Project and Issuetype so you're not getting this up for all projects and issues types.
It looks like you're new here. Sign in or register to get started.