The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
Samuel Gatica _ServiceRocket_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
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

 

 

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events