Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Set Parent key for subtask in Advanced mode in Automation for JIRA

Romain VELON
Contributor
September 8, 2020

Dear Community,

I am trying to create  an automation rule to transform a "Task" issue type in a "subtask" one when this Task is linked to another parent issue. 

Trigger : when a link is created between 2 parent issue - 1 of type Enhancement and 1 of type Task

Then I would like to transform the Task into subtask of the Enhancement. 

image.png

I'm using the "Edit fields" action to change the issue type. "Parent key" is not available as a field to be set. So I try it in the advanced mode. 

This Automation is not successful, I should have something wrong in my JSON in Advanced mode. 

image.png

Error I get is "Issue type is a sub-task but parent issue key or id not specified. (issuetype)"

Thank you for your help.

Romain

 

4 answers

1 accepted

1 vote
Answer accepted
JD
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 13, 2020

Hi @Romain VELON ,

We currently don't support converting "tasks" to "subtasks". This operation can often require an "issue move" operation which involves field/workflow mapping depending on your setup (if you go to your task click the "..." and hit convert to subtask you'll be taken through the remapping).

As mentioned above the alternative is to use the "Clone issue" action, set the issue type to subtask and the parent issue to trigger issue (and then clean up the old task).

Hope that helps,

John

Romain VELON
Contributor
September 14, 2020

Thank you @JD , I will proceed that way.

1 vote
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 8, 2020

The parent key is not "just a field", it's a structural thing and can't be just set, you have to use something that can change the linked parent.  I don't think you can do this in a simple Automation "edit fields"

Curt Holley
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 8, 2020

I agree with Nic. I don't believe you will be able to change the issue type....you could make a copy of it as a sub-task (with its own unique key) and then delete the 'task'. But It's all getting a bit complicated

Romain VELON
Contributor
September 9, 2020

Thank you @Nic Brough -Adaptavist- , @Curt Holley , I was pretty sure it would not be possible. 

Copy it as a subtask was my second option, I'll try it. 

0 votes
Richard Vencu
Contributor
October 17, 2020

I was able to convert an issue to a subtask, just not sure what field to update to specify the parent. If subtask and issues are both using the same workflow it seems feasible.

image.png

Richard Vencu
Contributor
October 17, 2020

OK, got the same error as mentioned here.

If there is no attempt to set up the parent key then the issue can be converted to subtask but it is not linked to any parent so probably not very useful. Going to explore the clone issue route as well.

0 votes
Curt Holley
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 8, 2020

Question @Romain VELON the "Parent to child relations" in your trigger....is that a link type description you have in Jira? As i don't see that option, only link types that we have set up in our instance.

I only ask as I was looking the other day for a way to trigger from changes to the Advanced Roadmaps "Parent link" filed.

Romain VELON
Contributor
September 9, 2020

Hi @Curt Holley , 

Yes this is a link I created on the instance. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events