Forums

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

Structure - Attribute Based Filtering via Global Variable

Damir Perić
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 3, 2024

Hello, 

I am trying to filter my epic issues based on the string value I saved as a global variable (column) but it's not working as I expected. 

Let's say I have 3 filters in the structure: 

- Current PI = fixVersion.contains (PI01)

- Current PI +1 = fixVersion.contains (PI02)

- Current PI +2 = fixVersion.contains (PI03)

My Formula is: 

For Current PI = fixVersion.contains(CONCAT('PI'; currentPI))

currentPI is a variable based on Current PI (Formula) global column which is nothing but a string value (e.g. "01")

To visualize it, attaching the screenshot:

2024-01-03 15 46 43.png

So, if I want to filter Current PI +1 my formula is fixVersion.contains(CONCAT('PI'; currentPI+1)), etc. for each incremented PI version filter. The goal was to create kind of dynamic filter, where the only change I need to do is to define my Current PI fixVersion number in a global variable and not to change the all filters every time.

This is all working fine until I do not change the global variable value. If I do, the reference to Current PI (Formula) global column is broken, and I see a literal string in the Filter By Attribute definition (which was the previous value assigned to that global column - 69 in this case). 

2024-01-03 16 07 45.png

What am I missing? :D 
Is it possible to achieve the same result through some other solution?

NOTE: In my organisation we do not keep track of Release Versions (when they start, end etc), so I am not utilizing any predefined releaseVersion functions etc.

Thank you for the inputs!

1 answer

0 votes
Stepan Kholodov _Tempo_
Community Champion
January 4, 2024

Hello @Damir Perić 

We would need more details about your setup to better understand it. It looks like you have a formula as a column in your structure and you're using it in the same structure in the Filter Attribute transformation; but even if it's so, it's still not clear what changes exactly when you see the unwanted result.

Please reach out to us directly at our support portal and we'll get back to you there.

Best regards,
Stepan
Tempo (the Structure app vendor)

Damir Perić
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 5, 2024

Hi @Stepan Kholodov _Tempo_ ,

Thank you for reaching out.

The problem is that if I change the formula (e.g. string "69" to "70"), the "Filter by attribute" stops using the "Current PI (Formula)" column as a reference (you can see it in the first screenshot) and starts using "69" (literal string which you can see on the second screenshot) as a filtering value, and not "70", which is the new value in a global variable (Current PI (formula)" column.

A similar issue seems to be reported here: 

Jira Structure Global Variables 

Support variables / formulas global to a view or structure 

Basically, if you have a global variable, once that variable is changed, any references to that global variable (column) should retrieve the new value, otherwise you need to reload the formula on all the places where this reference to a global column exists, which is not so convenient. 

Best regards, 

Damir

Julien Huon March 17, 2024

Hi @Damir Perić, did you have an answer or solution to that Global variable issue ? I have the same need to externalize a value that would be used in lots of formulas, then if I change it, it would need to change formula results accordingly to the new value of that global variable, and therefore recalculated.

Suggest an answer

Log in or Sign up to answer