Forums

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

How to count how many times a specific string appears in the labels?

Martin Härri
Contributor
June 3, 2023

We use the field "labels" to indicate to which team an issue is assigned to. Sometimes users assign issues to multiple teams, which they shouldn't, as it has an impact on the metrics.

Is there a way how to find duplicate assignments? All our team labels start with "z_" (e.g. z_Alpha, z_Beta). Something like "if the count of "z_" in the labels field > 1 then error"?

Thanks for your advice!

2 answers

2 accepted

1 vote
Answer accepted
Bill Sheboy
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 Leaders.
June 4, 2023

Hi @Martin Härri 

There is nothing built into to do that.  How often do you need to perform this check?

If it is infrequently, please try a JQL search ordered by the labels to find the duplicates.

If you need this more often, consider checking if you have addons to enhance the features of JQL, or make a dashboard showing labels to quickly find issues with multiple labels, or try an automation rule.

Kind regards,
Bill

Martin Härri
Contributor
June 4, 2023

Hi Bill, thanks for your reply!
Actually I would like to set up a filter where people can subscribe to and get a daily alert. I think I'll try an inelegant way like "if ((a and b) or (a and c) or (a and d) or (b and c) or (b and d) or (c and d)) then error.

0 votes
Answer accepted
Hannes Obweger - JXL for Jira
Atlassian Partner
September 12, 2023

Hi @Martin Härri,

if you are open to solutions from the Atlassian Marketplace, this would now be easy to do using the app that my team and I are working on, JXL for Jira.

JXL is a full-fledged spreadsheet/table view for your issues that allows viewing, inline-editing, sorting, and filtering by all your issue fields, much like you’d do in e.g. Excel or Google Sheets. It also comes with a number of advanced features, including support for (configurable) issue hierarchiesissue grouping by any issue field(s), sum-ups, or conditional formatting - as well as the ability to filter issues based on regular expressions

With regular-expression-based filtering, you can apply pretty much any logic, including the one that you are after:

regex-filtering-labels-multiple-starting-with-x.gif

Once you've narrowed down your list of issues, you can work on your issues directly in JXL, trigger various operations in Jira, or export your issues with just one click.

Any questions just let me know,

Best,

Hannes 

Suggest an answer

Log in or Sign up to answer