Forums

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

Structure: Formula for accessing array properties on linked issues

Jesse Wilson
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!
June 13, 2023

I am trying to access the fix version on issues that are linked to another issue through a formula.

I am able to access other properties; however, any properties that are arrays (fixVersions, components, labels, etc.) do not return a value.

For example, this works:

issueLinks.map($.source.key)

However, this does not:

issueLinks.map($.source.fixVersions)

There is no error, just no values returned.

My organization is running Jira v9.4.2 and Structure v8.2.2 (both Server).

1 answer

1 accepted

1 vote
Answer accepted
David Niro
Atlassian Partner
June 14, 2023

Hello @Jesse Wilson ,

Welcome to the Community!!

You will need the FLATTEN() function here.  

issueLinks.MAP($.source.fixVersions).FLATTEN()

The problem is that issueLinks is an array of values and fixVersions is also an array, creating "an array of arrays", which needs to be flattened.

I do also want to point out that the current issue in the structure could be the "source", so you may need to review your formula to make sure it returns the desired results.

Please let me know if this helps!

Best,
David

Jesse Wilson
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!
June 14, 2023

Thanks @David Niro , that worked perfectly!

I thought I had tried to flatten previously because of that reason, but I must have mistyped something. I am also taking into account the source/destination combinations, but appreciate you mentioning it, nonetheless.

Like • 2 people like this
David Niro
Atlassian Partner
June 14, 2023

you're very welcome!

Like • Dave Rosenlund _Trundl_ likes this

Suggest an answer

Log in or Sign up to answer