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
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.