Forums

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

Jira Software - Custom Field - Context Value group by in Structure gives multiple groups

Laszlo Gal July 21, 2023

Environment:

  • Jira Software Data Center Jira v8.20.15
  • Structure for Jira by ALM Worksv 8.0.1

We have a custom field called 'Team(s)'

We have two Jira projects, different context defined for this custom field in both projects

We have the some teams working on both of the projects and we defined for each context the same name for these teams.

When we create a structure that covers both Jira projects and we want to group the Jira issues by the 'Team(s)' custom field, despite the fact that the field value is the same in both projects, the Structure Group By functionality creates two groups, as if these context value IDs would be used for grouping and not their values.

If this is the case, it may be logical from performance point of view, however we would like to go around this problem. One way that we thought might be possible is to add to the Group by / Attributes a formula, where the formula extracts the Custom field's value instead of itself that might be just a UI representation of the context record behind the scenes.

Our question: is there such a formula that returns the Custom Field's context value?

If not, is there any other way we could influence the Structure plugin's mechanism to use the context value and not the background object ID?

1 answer

1 accepted

0 votes
Answer accepted
Stepan Kholodov _Tempo_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 24, 2023

Hello @Laszlo Gal 

IDs are indeed used for grouping by default and not the actual values. The approach with the Attribute grouper with a formula can work - if the field is called 'Teams' than the used formula should be teams.value

Best regards,
Stepan Kholodov
Tempo

Laszlo Gal July 24, 2023

Hello @Stepan Kholodov _Tempo_ 

Actually the field is called "Team(s)" and this way I'm having problems to put it into the formula: due to the brackets in the field name the formula misinterprets them and I could not figure out how to escape them.

Your recommendation however gave me the clue how to go around the issue:

The name suggests and indeed the custom field is an array, hence I found the following trick:

  1. Clicked on [+] right to the Automation
  2. Selected Group by ...
  3. Searched for Attributes...
  4. In the Group by dialogue typed 'Formula'
  5. Clicked on the cogwheel and in the dialogue of the formula definition typed: v_teams.join(',')
  6. Defined the v_teams variable by clicking on it below the dialogue box in the Variables section and searched for the 'Team(s)' custom field name.

This way the array was converted into a signle string that was surrounded by brackets and the individual array items were separated by a comma.

P.s. Both .values and .join(',') work however when multiple teams are assigned to an issue (in our practice it is rare but possible), the latter shows the whole array's members concatenated while the former does not.

Thanks for your ideay!

Like Stepan Kholodov _Tempo_ likes this

Suggest an answer

Log in or Sign up to answer