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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,459,120
Community Members
 
Community Events
176
Community Groups

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

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 Feb 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.

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 Feb 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

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

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

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!

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!

@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

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 Alexander Wayne likes this

@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

 

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.

@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

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 Feb 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

Atlassian Community Events