Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,295,414
Community Members
 
Community Events
165
Community Groups

Rule to apply label if label is in description

Hi, I have a list of Labels I have created. I want to now have labels automatically assigned to tickets where the description or summary uses one of the labels

 

example - access appears in the description and I have a label for that, I want the access label to be inserted into the label field automatically 

 

Is this possible?

1 answer

1 accepted

2 votes
Answer accepted

Automation for Jira should be able to do that.

You need a rule with:

  1. Trigger: do this with a scheduled trigger so that you existing issues are processed, as well. Or, you can use the "issue created" and "issue updated" triggers if you want to process only the issues that are created from now.
  2. Condition: you can have access to the description field with the corresponding smart value. Basically the condition should be:
    1. if description contains the substring "access"
  3. Action: add label action with the argument "access".

The problem with that is if you have a large number of these keywords/labels, then it will result in a really long list of condition-action pairs.

If that's the case, then you can develop a script for the ScriptRunner app which would do the same thing, but having the mapping from keywords to labels can be very concise in Groovy code.

Thank you. Appreciate that. Let me give it a go 

So your above mentioned solution is what I did have already when I checked my rules. So thank you that did confirm I was on the right path.

I will look into ScriptRunner because as our keywords increase I would want it to automatically add and not have me manually doing it every time 

 

Thanks 

Like Aron Gombas _Midori_ likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
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