Forums

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

Autopopulate Field using automation

Omkar Rajale August 12, 2024

Hi,

I have a field "Risk" on Epic which is a choiceList with values Red/Yellow/Green. Epics will have some stories linked to it and story will also have this Risk field, which will be provided by user.

For ex. An epic having 10 stories as child.

  • If Risk of all stories are "Green" then set Risk of Epic as "Green".
  • If at least one of the stories is "Yellow" them set Risk of Epic as "Yellow".
  • If at least one of the stories is "Red" them set Risk of Epic as "Red".

Is it possible to implement this scenario using automation in jira

1 answer

1 accepted

0 votes
Answer accepted
Dick
Community Champion
August 12, 2024

Hi Omkar,

In your case I would build an automation with a trigger on the change of content of the Risk field on issuetype stories. You can follow that up by saving the parent key and subsequently using lookupIssues with a JQL query that tests for the two conditions, being parent key and Risk = Green.

Rinse repeat for Yellow and Red

You can store the lookupIssues.size parameter in a variable each time, so it can be used to test your three test conditions and setting the parent epic Risk accordingly.

I hope you find this useful

Dick

Dick
Community Champion
August 12, 2024

You can only have one set of lookupIssues at a time, so make sure the .size parameter is stored before you go for the next lookupIssues query.

Omkar Rajale August 13, 2024

Thanks a lot for helping. It was a little tricky, but it worked.👍

Dick
Community Champion
August 14, 2024

Hi Omkar,
If you post a picture of the automation, we're helping out people with questions similar to yours. Two flies in one stroke, so to say.
:)

 

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