Heads up! On March 5, starting at 4:30 PM Central Time, our community will be undergoing scheduled maintenance for a few hours. During this time, you will find the site temporarily inaccessible. Thanks for your patience. Read more.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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