Forums

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

How to update "team" field of child using automation

daniel.nordal July 25, 2024

I have created an automation to "create stories with sub-tasks when creating epic" -> picture 1. The idea behind the automation is to build logical structure for work flow and resource management. 

Epic = Project 

Story = Key Milestone

Sub-Task = Daily objectives/induvial tasks of any key milestone

Now, I am trying to assign an individual team to each Story -> picture 2. However, when I use the "edit issue fields" it only updates the Epic and not the Story. The JSON code works just fine for updating the "teams field" but it updates the Epic and not the Story. I only want to update the "teams filed" of the Story and not the Epic. 

Rule1.PNGRule2.PNG

 

2 answers

1 accepted

0 votes
Answer accepted
daniel.nordal July 25, 2024

@Anandhi Arumugam _Cprime_ I didn't see your answer but I figured it out by trail and error... maybe this will help others in the future, but you are correct. In order to update stories within Epics you must create a branch and assign the branch to the "most recently created issue" and then you can use the same "edit issues field" as shown in the original post. You duplicate the branch for each Story in the chain. Also remember to use the correct "Team ID", this can be found at the end of the URL of each teams page. 

Rule3.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.
July 25, 2024

Hi @daniel.nordal -- Welcome to the Atlassian Community!

For the rule you show, why not set that field at the same time the Story is created?  The advanced edit with JSON is available in the Issue Create action

The branch to most recently created issue would then be needed only to create the Subtasks under the new story.

Kind regards,
Bill

Like daniel.nordal likes this
daniel.nordal July 25, 2024

@Bill Sheboy I had not thought of that... but it also works and I have confirmed it works... and it is a much cleaner automation. It even has improved the runtime of the automation. 

Automation with branch method - 25s runtime

Automation with JSON in Story - 22s runtime

Rule4.PNG

Also, I did not need to use branch for Sub-Tasks as you mentioned. I expect this is because I have created a "New Variable" before creating Sub-Task which allows this automation to run correctly. For fun I have changed the automation to use branches for Sub-Tasks under Stories and removed the (Re-fetch and New Variable) Commands. For this the runtime has improved further to 20s (picture below). Basically, this seems to be a more simple automation for Jira to run. Thankyou.

Rule5.PNG

Like Bill Sheboy likes this
0 votes
Anandhi Arumugam _Cprime_
Community Champion
July 25, 2024

Hey @daniel.nordal Use a branch/related issues and pick Stories (or other issues in the Epic) to update the Story's fields. Hope this works for you.

 

Suggest an answer

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

Atlassian Community Events