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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Need to count or sort by number of labels.

This question appears to have done the rounds with most answers being about buying an addon or creating a script. 

I've noted that in JQL you can ORDER BY labels and this will alphabetise one way or the other. However I need to sort by the number labels either as a count or by sorting the results.

 

1 answer

1 accepted

0 votes
Answer accepted

Hi Andrew,

Unfortunately, there are no native ways to get what you need: an app or script would be required.

As a workaround, you may:

  1. Go to the issue navigator and save as a filter the query you would like to order by labels.
  2. Ensure the Issue Key and the Labels fields are being shown in your selected columns.
  3. Export the results to Excel CSV (current fields only):
    _labels.PNG
  4. Open the resulting CSV file with a text editor and replace all commas (,) with semicolons (;). Save the changes.
  5. Open the modified file with Excel and add a new column titled #Labels. Use the COUNTA(<range>) function to count the number of non-blank values under any of the labels columns within the very same row:
    excel.PNG
  6. Click on the cell where you have just added the COUNTA function, then click on its bottom-right corner and drag & drop it down to the last row in the spreadsheet. That way, your formula will be copied to the remaining rows, but updating the range conveniently.
  7. Click on Data > Filter so that the buttons with the dropdowns appear on all column headers, and click on said button from the #Labels column header to select the order based on that value.

You may also filter data to hide rows (issues) that do not match your desired requirements.

Finally, you can also easily create a comma-separated list of issue keys from Issue Key column and paste it in a JQL like issuekey in (<your  comma-separated list of issue keys>), so that you can execute a filter in Jira that gets the issues you want and continue interacting back with those issues within the tool.

Hope it helps.

Thanks @Ignacio Pulgar . I had already done the workaround you suggested. Odd you can do a Zendesk ticket count and not a label count. At least I have a definitive answer that what I specifically want can't be done without an additional app or script.

Like Ignacio Pulgar likes this

@andrew.stuart how do you do the Zendesk ticket count ?

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you