Forums

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

Jira Cloud - Automation on Sub-Task, Trigger by another Sub-Task

Jacob Pines
Contributor
March 7, 2022

Hi,

I am looking for a way via Automation, to update a field on a Sub-Task, when another Sub-Task under the same Parent is updated.

Is there a way to do that? If yes, how exactly?

Let me know if more info is needed.

Thanks

1 answer

1 accepted

1 vote
Answer accepted
Mark Segall
Community Champion
March 7, 2022

Hi @Jacob Pines 

You would want to perform a branch based upon JQL Here's an example:

2022-03-07_07-06-46.png

For copy/paste, here's the JQL:

parent = {{issue.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.
March 7, 2022

Hi @Jacob Pines 

Yes, and...to Mark's answer:  Two additional ideas...

If you only wanted this to happen for subtasks, please add a condition after the trigger to check if the issueType is a subtask.  Otherwise a team-managed project would cascade the value from stories up to epics also.

Next, add a condition after the branch (before the edit) so the field is not updated when it already contains the values desired.

Kind regards,
Bill

Like # people like this
Jacob Pines
Contributor
March 9, 2022

Ok, I was able to make this work, thanks to both your suggestions.

Below is the test rule I was working on, and details in case anyone wants to do something similar:

  1. Triggers only when field "DepHOCode" changes. The field exists on Sub-Tasks only.
  2. Filter (JQL query) to work only on Sub-Task with specific Summary. As this is a test Rule, I limited to specific Reporter.
  3. Get value of the updated field and enter in Variable.
  4. Get Specific Sub-Task under same Parent. This is from your suggestions. ^_^
  5. Update field in Sub-Task using Variable value.

Jira Auto Rule.png

By the way, if there is a way to use value from Trigger Sub-Task without using Variable, let me know :)

Like Bill Sheboy likes this
Mark Segall
Community Champion
March 9, 2022

Hi @Jacob Pines - There is a way to copy the value from the trigger issue.  Where you set the variable, there's an ellipses to the right where you can change it to copy from and then you'll get a drop down to copy from trigger issue.

Like # people like this
Jacob Pines
Contributor
March 9, 2022

Thanks @Mark Segall   

Made the change now... :)

Suggest an answer

Log in or Sign up to answer