Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
  • Community
  • Q&A
  • Jira
  • Questions
  • How to set automation so when a specific label is added it triggers but not if more added after

How to set automation so when a specific label is added it triggers but not if more added after

Philip Ng
Contributor
October 15, 2025

I am trying to setup my automation so that when a specific label (released) is added, it will trigger the automation to add a comment. However, I do not want it to trigger again if additional labels are added afterwards. I have tried using the smart values condition option, but it still triggers when I add other labels after. I am guessing the value I am trying to use is not correct. "{{issue.labels.get("before")}}" does not contain "released". Is there any way to accomplish this? Thanks in advanced

2025-10-15_12-30-40.png

2 answers

2 accepted

1 vote
Answer accepted
Gor Greyan
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.
October 15, 2025

Hi @Philip Ng

Try this smart values.

 

After the trigger, put 2 compare conditions.

1.{{fieldChange.toString}} contains  released

2. {{fieldChange.fromString}} doesn't contain released

 

Together these ensure the rule only fires when released is newly added — not when it’s already there and you add or remove other labels later.

 

Let me know, if this works.

Philip Ng
Contributor
October 15, 2025

Thanks Gor. Yea I was able to use this method to get what I needed

Like Gor Greyan likes this
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.
October 15, 2025

Hi @Philip Ng 

Please try using the field change smart value for only the added values:

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--fieldChange--

Note this may be an incomplete solution as there is nothing stopping a person from adding the label, removing it, and adding it again.  When you want one-and-only-one comment for the first time the label is added, you could add a conditional check to detect if that comment has ever been added before by checking the prior comments.

 

Kind regards,
Bill

Philip Ng
Contributor
October 15, 2025

Thanks Bill. I was able to figure it out using this smart value instead

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