I am trying to use Jira automation to amend the issue type of an issue from a standard issue type to a sub task. When doing this I need to be able to set the parent of the sub task so that is correctly linked to the relevant parent task.
I have created an automation rule that triggers when an issue is created with a specific issue type. I am then creating a variable by using the issue.summary and then splitting on a space to use the first part of the summary which will be in the format "SD-123 - title" where SD-123 is the Jira issue key of the parent task I want to link the sub task to. This will give me a variable named Parent that will contain "SD-123" for example.
I am then using the "Edit Issue" action to edit the issue type to a sub task and then trying to set the parent using the additional field JSON shown below, which uses the variable created above:
When the automation rule is triggered it completes successfully, without any issues, amending the issue to a sub task as required but the sub tasks parent doesn't appear and the sub task ends up without a parent.
Is there something I am missing when setting the parent in the additional field JSON shown above or is it not possible to set the parent of a sub task in this way and therefore my required outcome not achievable?
Any help with this would be appreciated.
If you are trying to edit the parent for a sub-task, it does not appear to be possible yet. I found that looking at the advanced JSON help and using a REST API call to gather the editmeta data for a sub-task.
Hi @Bill Sheboy ,
Thanks for your response.
Could you please just confirm that I am understanding you correctly?
I think what you are saying is that this is not currently possible via either Jira automation or the Rest API at this moment in time?
I have found the following request on Jira Server which I presume would resolve my problem if the same was done on Jira Cloud:
Thanks again for your help.
Hi, Dan. Correct; it does not appear to be possible yet.
The suggestion you noted is for Jira Server, and I did not find a corresponding one for Cloud. You may add that suggestion in that same backlog by selecting Create at the top of the page. I recommend then adding a comment to link the two items (or put it in the description) to help Atlassian see both items.
Catch up with Atlassian Product Managers in our 2020 Demo Den round-up! From Advanced Roadmaps to Code in Jira to Next-Gen Workflows, check out the videos below to help up-level your work in the new ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event