Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Group By based on a formula where issues may be returned in multiple segments


We use Structure on Jira Datacenter. We have a lot of labels on issues for tagging all sorts of dimensions (frameworks, middlewares, OS, application ownership, cmdb ref #…etc). I’d like to add to a Structure with  « Group By » quick transformations for each dimension by using a formula.

As an example, let’s say I have 3 issues :

  • Issue A : labels Windows2012, Websphere, UnitA and others
  • Issue B : labels Windows2016, Weblogic, UnitB and others
  • Issue C : labels Windows2012, Windows2016, Weblogic, UnitA and others

I’d like to add a quick transformation « Group By windows version », so I created a group by transformation based on the formula IF(SEARCH("Windows2012", labels), "Windows 2012", SEARCH("Domino2016", labels), "Windows 2016").

The result is :

  • Folder « Windows 2012 »
    • Issue A
    • Issue C
  • Folder « Windows 2016 »
    • Issue B

But , since Issue C contains both Windows2012 and Windows2016 labels, I’d like this issue to appear under both folders:

  • Folder « Windows 2012 »
    • Issue A
    • Issue C
  • Folder « Windows 2016 »
    • Issue B
    • Issue C

Is there a way to do so when using group by based on a formula?

Thanks for your help

1 answer

1 accepted

0 votes
Answer accepted

Hi Etienne,

Your assessment is correct this is they way that it works currently.  Unfortunately there is not a good way to handle this with formula groups.  The problem is a labels field returns multiple values so the issues go into multiple groups, but a formula can only return a single value.

The good news is there are alternative options.

1. You could make a structure with multiple folders and in each folder have an insert JQL like: labels = "windows 2012", for each label you want to include.  This will still result in duplicates showing up once in each group.

2. If you can wait there will be a much nicer way to handle this with the next version of EXPR.  We expect EXPR 2.0 to be available later this year, and it will have array support which should make this a trivial formula to write.

Please let me know if you have any further questions.


Nick Ellis

[ALM Works]

M_ Ga I'm New Here Jul 12, 2022

Hi Nick

I just found this entry and have the same issue as Etienne but in the meantime we've got Structure 7.2.0 which we could use EXPR 2.0. 

Could you explain how you would write the Array based on Etienne's use case?



Hi Marcel,

This is pretty straight forward in Expr 2.  You just check the list of labels against an array of items you are looking for like so:

  ARRAY("Windows 2012", "Windows 2016")

Then you can group by this formula using the attribute grouper.  Attribute grouper documentation.


M_ Ga I'm New Here Jul 13, 2022

Hi Nick,

Works like a charm :) thank you!



Suggest an answer

Log in or Sign up to answer

Atlassian Community Events