Forums

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

Jira DC / count members in multi select group

sylvain_lanthier2_bell_ca
Contributor
August 16, 2024

Hello,

I'm trying to update a "Number" custom field with the total count of members present in all selected groups within an issue.

Do you have any suggestions for how I can achieve this?

Regards!

1 answer

1 accepted

1 vote
Answer accepted
Samuel Gatica _ServiceRocket_
Community Champion
August 19, 2024

Hi @sylvain_lanthier2_bell_ca 

Unfortunately, Jira doesn’t directly provide a way to count users in a group via JQL.

As an alternative solution, you can achieve this by utilizing Automation and the "Lookup" action to retrieve group members.

  • Add a "Lookup" Action to Fetch Group Members: Add a "Lookup issues" action (this will allow you to perform additional logic). Use a JQL to retrieve issues that match your criteria, including the ones with the groups you're interested in.
  • Calculate the Total Count of Group Members: Use a smart value to calculate the total number of members across the selected groups.

    • {{issue.customfield_XXXX.size}}
  • Update the "Number" Custom Field: Add an "Edit Issue" action to update the "Number" custom field with the calculated count.

    • {{#=}} {{issue.customfield_XXXX.size}} {{/}}

 

Hope this helps!

Best regards

Sam

 

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events