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

Automation - Update field Sub-Task dose not update other Sub-Task /same parent task

Alexander Wayne February 21, 2022

Hi, this is driving me crazy, I cannot figure out how to get sub-task's to update all other sub-task's with in the same parent task.

Project
is JSD with a couple custom single line text fields and 4 custom task's added to the Project in JSD

My single line text field is called "Provider ID" The field is blank on creation for the Parent Task and all x4 sub-task's . 

I have tried soooo many different ways to make an automation rule.

Currently, I have gotten a sub-task to update the Parent Task just fine.
Just can not get the sub-task thats been edited to update the other sub-task's.

I have disabled all rules in the project except for the one I am discussing just in-case.

Automation_-_JIRA.pngAutomation_-_JIRA-2.png

3 answers

1 vote
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.
February 21, 2022

Hi @Alexander Wayne 

Welcome to the community!

Your "not working" branch is because the rule is triggered by a sub-task, the "For: Sub-tasks" will not work because there are no sub-tasks of the sub-task (i.e. trigger issue).

So, I would build a 2nd rule for when the parent issue is updated (by the "working" part of your rule) that triggers off the provider ID being updated and then you can deploy the "For: Sub-tasks"branch. Maybe add in a condition to only overwrite ones that do not already equal the trigger issue provider ID. 

and remember to tick the
"Allow rule trigger" in the Rule details

Check to allow other rule actions to trigger this rule. Only enable this if you need this rule to execute in response to another rule.
Alexander Wayne February 21, 2022

Hi, thanks. My fist picture has no sub task branch, nothing get updated

Even if I set sub-task branch to update from the parent task if its been updated. still dose not work.

Probably 4 different rules I'm testing currently, have a separate rule sub task rule with a branch or no branches. made condition after the parent branch to update to to any Sub-task. Nothing.

Whats crazy, theres now viedo or mention of updating a sub-task from another subtask in jira, I can't be this first person..... 

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.
February 21, 2022

OK. first rule should be the "Working" part of your 2nd screenshot. The bit that updates the Parent when a sub-task has had its provider ID updated.

2nd rule should be something like the below. Note: I don't have a provider ID field so used components. Just replace the "Components" with your field. Also the smart values are just a guess, but you get the idea....yeah?

2ndr.png

Like Stefan Salzl likes this
Alexander Wayne February 21, 2022

Thx, I made changes before I saw this, I'll try it... I posted a new commit

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.
February 23, 2022

Hi @Alexander Wayne 

Just to confirm...is the originally triggering issue a subtask...leading to a change of the parent and all sibling subtasks?

If so, have you considered using a JQL branch for the issues with the same parent?  For example:

  • trigger: value changes for Provider ID field
  • condition: issueType is your subtask type
  • branch: on parent
    • condition:  Provider ID does not equal the trigger issue's Provider ID
    • edit: update the parent's Provider ID
  • branch: on JQL with parent = {{triggerIssue.parent}} AND issueType = your subtask type
    • condition:  Provider ID does not equal the trigger issue's Provider ID
    • edit: update the sibling subtask's Provider ID

You would still need a rule for the case of the Parent being edited first, triggering an update to all subtasks.  Do not enable "Allow rule trigger" with either rule using this design, or you could create a rule loop.

Kind regards,
Bill

Alexander Wayne March 2, 2022

Hello @Bill Sheboy , thank you for taking the time to reply. I lost this post somewhere in the mix of things.

To answer you question, no; i'm not trying to update the Parent Task for its siblings Sub-Task's. Many of custom fields only live in the sub-task and not the parent.

Trying to copy field data from one sub-task to another sub-task.(same parent)
I did make a 2nd tab(screen) in the parent task, and put all fields found in my custom sub-task in that tab to hide them.
Then created a Automation rule for Sub-Task and Parent Task. Every thing working and updates any time there is a change. 

This is a messy solution and I not have 10 rules for one issue type.(certain fields get updated at different times of the week)

Would prefer to have one master rule just to update sub-task > to > sub-task. Updating the Parent task is not necessary.

I tried your above solution for transitions:

When a Custom_1-sub-task equals status = Done transition Custom_2-sub-task to status = READY
(wrote this in short hand, not actual JQL for automation)

Could not figure your JQL branch 

Thx so much!

Alexander Wayne March 2, 2022
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 3, 2022

Looking at that error message and the JQL for the branch, that does not look correct.  Please take a look to see if it matches what you wanted.  Thanks!

Alexander Wayne March 3, 2022

@Bill SheboyThank you ? I'm sorry I have to laugh. :-) I know its not correct.. Maybe its my fault. I asking how to fix it or what JQL to write?

Did you get a chance to see my above commit paragraph above the picture?
I tried to writ it best I know how to.

JQL is new to me, so I can't find Atlassian or other source that talk about JQL branches when it comes to sub-task > to > sub-task updates

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 3, 2022

Sorry, I was not trying to be snarky...I wondered if you missed seeing the error.  :^)

Please try this to return all the subtasks of that type which have the same parent issue:

parent = {{triggerIssue.parent}} AND issueType="Support Sub-task"
Like # people like this
Alexander Wayne March 3, 2022

@Bill Sheboy You weren't haha All good! Can't wait to make a help video after I get all of this !

So, I tried that, still nothing. Says the branch dose not mach. I have been playing with it for a few minuets. Even changed first condition just in-case.

Side-note. In a separate window, I am validating the JQL by searching for the task. issueType="Support Sub-task

I do return all found sub-task in the search window. 

Really appreciate the Help

Branch Error.png

 

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 3, 2022

Based upon the results in your audit log...what do you see if you run this in a stand-alone advanced search:

parent = SSD-346 AND issueType = "Support Sub-task"

If that returns nothing, that would explain your results as that triggering sub-task (of type "OPs Sub-task") has no siblings of the "Support Sub-task" type.

If it does return results, please check the names of your subtasks for spelling, capitalization and spacing differences from the JQL in the rule.

Alexander Wayne
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 3, 2022

@Bill Sheboy (posting from another account) You are correct, there was a typo!

Thank you so much for your help! I'll make a video and tag it here when I'm done.

I'll also try this JQL Automation Code for updating custom subtask fields.

 

 

It took meee 20 mins to try and replay so you were not left hanging...

6545648161.png5221514651.png

Like Bill Sheboy likes this
0 votes
Alexander Wayne February 21, 2022

I made changes and can get sub-task to update, but only if I type in an update to the Parent task, then it updates all sub-task

My rule 2 dose update the parent task, if i type a change in one of the sub-task, but dose not trigger rule 1 to run with any changes to re-manning subtask

 

Automation_-_JIRA-3.pngAutomation_-_JIRA-4.png

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.
February 21, 2022

Does your Rule 1 have this ticked in the Rule details?

"Allow rule trigger" 

Check to allow other rule actions to trigger this rule. Only enable this if you need this rule to execute in response to another rule.
Like Stefan Salzl likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events