Forums

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

Jira Structure Formula - Linked issue's labels containing a specific label

Tommy Heyser March 9, 2023

I have a structure with an Insert generator inserting "Feature" issues.  Then I have an "Extend" generator that adds linked issues, i.e. child Stories.  These child Stories started off with a single label, e.g. "Modules", and I was able to count the number of issues with that particular label and get percentage of "in progress" issues using the following formula:

IF ( issuetype = "Feature" ;

IF ( issuelinks.FILTER($.type = 'Stories' AND $.destination.labels = "Modules").SIZE() > 0 ;

WITH storyProgress = issuelinks.FILTER($.type = 'Stories' AND $.destination.labels = "Modules" AND ($.destination.status = "Implementation In Progress" OR $.destination.status = "Implementation Review" OR $.destination.status = "Closed" ) ).SIZE() / issuelinks.FILTER($.type = 'Stories' AND $.destination.labels = "Modules" ).SIZE() * 100 :

storyProgress

)
)

 Now, as soon as the stories have more than one labels, the code: 

$.destination.labels = "Modules"

no longer works, since the labels value returns ALL the labels for any given story.

Any suggestion on a way to count if the labels value "contains" a particular label when the labels value contains multiple labels? 

1 answer

1 accepted

1 vote
Answer accepted
David Niro
Atlassian Partner
March 13, 2023

Hello @Tommy Heyser ,

I believe the CONTAINS() function should work for you in this case.

You should be able to string it together with what you already have, like this:

$.destination.labels.CONTAINS("Modules") 

Please let me know if it helps!

Best,
David

Suggest an answer

Log in or Sign up to answer