Forums

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

Global variable in automation

Tony Georgiadis
April 24, 2023

Hi all,

I'd like to create automation that updates an Epic's custom field based on a comparison of its child issues data.

Basically I'd like to achieve the following:

- When: An Epic is closed

- Then: It loops through the Epic's child issues and finds the latest resolution date 

- And: Updates a custom field (e.g. 'End date') on the Epic with the latest resolution date of the previous step

The problem I'm facing is that variables created in automation routines in Jira don't have global scope, so a variable that is set within an if branch is not visible outside of it.

Does anyone have any ideas about how I could solve this problem?

Thank you in advance,
Tony

2 answers

0 votes
Alana Fernando
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 Champions.
June 7, 2018

Hi @Ron Logan,

This is because you current JQL query has != operation. 

Instead of filtering that way, 

Try to define you JQL as below. It will filter tickets that contain exactly defined epic links only. 

"Epic Link" in (epicLink1, epiclink2)
0 votes
tdoran
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 7, 2018

would adding in a 

and "Epic Link" is not EMPTY

help you get you the "certain Epics and their related Issues" that you are looking for?

 

Suggest an answer

Log in or Sign up to answer