Forums

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

Automation - smart value and each cycle

lucie.bednarikova September 4, 2024

Hi, 

I am trying to create an automation that will go through all the issues under the epic and gradually add values ​​from the custom field from child issues to the newly created variable (via the Create variable option). 

 

When: Manually triggered 
Then: Create variable
     Variable name* (required): sumoflevelzero

     Smart value* (required): 0
--For: Children
--Then: Lookup issues
     --JQL: "Parent" = {{issue.key}}
--And: Edit issue fields
     --Advanced: {{#=}} {{sumoflevelzero}} + {{issue.customfield_10052}} {{/}}
   //here the value in the smart variable should be increased by the value of the child issue 

Then: Edit issue fields
Custom field: {{sumoflevelzero}}

 

Can anyone please tell me where I am wrong or what I should change? Thank you.

1 answer

0 votes
Trudy Claspill
Community Champion
September 6, 2024

Hello @lucie.bednarikova 

Welcome to the Atlassian community.

The Edit action is about editing the issue, not about updating a created variable. There is no action available for updating an existing variable. The only action available is Create Variable, which replaces the value of the existing variable.

Do I understand correctly that you are trying to sum of the values from a Number custom field in the child issues of an Epic, and set a field in the Epic with that sum?

The structure you have shown above is not actually stepping through the issues found by your Lookup Issues action.

Instead you should do the following, if you are manually triggering the rule from the Epic:

When: Manually triggered 
IF: issue type = Epic
Then: Lookup issues
     --JQL: "Parent" = {{issue.key}}
And: Edit issue fields (this will edit the Epic)
     Field to edit: your custom field
Value: {{lookupIssues.customfield_10052.sum|0}}

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events