Rule to apply label if label is in description

Marcus Soobiah June 7, 2022

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

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.

Marcus Soobiah June 7, 2022

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

Marcus Soobiah June 7, 2022

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
AUG Leaders

Atlassian Community Events