Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

using automation to change the epic of the parent of a subtask

Christophe Noualhat
Contributor
June 18, 2020

Hello

 

How can I update the epic of the parent of a subtask ?

EPIC-1

..........ISSUE-2

....................SUB-TASK-3

 

I am looking for a rule that triggers when something happens to SUB-TASK-3 and that will modify EPIC-1 ... the branching does not allow for this...  (SUB-TASK-3 does not have an epic, and its parent is ISSUE-2)

thanks

 

2 answers

1 accepted

6 votes
Answer accepted
nmenere
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 16, 2020

@Bill Sheboy was close on this, a rule like the following should work:

 

  • Trigger: sub-task updated (you may want to make this more specific)
  • Condition: issue type is sub-task
  • Branch: for jql: key = {{issue.parent.Epic Link}}
    • Action: the action you want to take

This will edit the Epic of the parent.

 

Hope that is what you were after.

Cheers,
Nick

Christophe Noualhat
Contributor
September 17, 2020

@nmenere Nick, this works and was so easy to setup !! Exactly what I was looking for but did not see this could be achieved with JQL code...

Where can we find all the info related to how to create the string like "key = {{issue.parent.Epic Link}}" ? That seems powerful !!

nmenere
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 20, 2020

So the JQL can use any smart values that are available.

We have some pretty comprehensive docs regarding smart values - https://support.atlassian.com/jira-software-cloud/docs/what-are-smart-values/

 

Hope that helps.

0 votes
Bill Sheboy
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.
June 18, 2020

Hi @Christophe Noualhat -- Welcome to the Atlassian community!

Have you tried something like this:

  • Trigger: sub-task updated (you may want to make this more specific)
  • Condition: issue type is sub-task
  • Branch: for parent
    • Condition on JQL: issuetype = Epic AND key = {{issue.epic link}}
    • Action: the action you want to take

Best regards,
Bill

Christophe Noualhat
Contributor
June 18, 2020

@William Sheboy  

Branch: for parent  : this will update the parent of my subtask... I want to update the epic above the parent....

Bill Sheboy
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.
June 18, 2020

Oops, my bad.  I forgot you cannot nest branches with automation rules.

Two possible work-around solutions:

1) I do not have a scripting add-on to test this... If you have something like ScriptRunner you could find the epic for the sub-task and then update it.  Use a JQL branch to find the epic.

2) Use two rules, one to find the story for the sub-task, and one to update the epic. You would need to store what you want to update in another field, and then invent your own trigger, such as a specialized comment. 

This second solution makes sense when cascading changes, such as moving a sub-task into progress pulls the story into progress, which then pulls the epic into progress.

Christophe Noualhat
Contributor
June 22, 2020

Hi @Bill Sheboy 

Thanks for your suggestions. We do not have script runner unfortunately and I wanted to avoid cascading as this would then use 2 rules with all the trouble associated... so I guess there is no other solution from the way automation is setup ?

Thanks ! 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events