Forums

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

How do I detect if a label exists?

Henry Yei
Contributor
July 17, 2023

I would like to check if a label is new (never used in any existing ticket), and act upon it in a jira automation rule.

 

Is this possible? I have an existing rule that lets users add certain keywords inside the comments that will add the appropriate label to the ticket, and want to send a warning if they are using non-approved/defined labels (to avoid typos etc). I am trying to avoid hardcoding the keywords inside the automation itself.

The point of using keywords, rather than just labeling directly was to encourage users to explain themselves by providing a shortcut for the label as part of the explaination. (labeling can cause automatic ticket closing and other actions).

1 answer

2 votes
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.
July 17, 2023

Hi @Henry Yei 

You could use either a JQL condition, or a Lookup Issues action and check that the results were empty.  The JQL would be something like this:

labels IN (yourValueToTest)

However...I wonder how you are detecting these keywords, labels, etc. in the comment.  For example, are the comments always structured in a certain manner that you only check the keyword under certain conditions, such as the comment contains "Keyword: yourValueToTest"?

Kind regards,
Bill

karim -Atlassway-
Banned
November 22, 2023

Hi @Henry Yei  @Bill Sheboy 

Using Colored Label Manager  you can see at a glance how often labels are being used

and Manage your labels globally or per-project

Suggest an answer

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

Atlassian Community Events