Forums

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

How to write automation rule when label is removed?

Елена Елена
Contributor
March 9, 2023

Hello

For example, I have an issues with Blocked label, how can I write automation rule to send me notification in Slack which says that this issue is Unblocked when I remove this label in jira?

 

Thanks

1 answer

1 accepted

1 vote
Answer accepted
Ravi Sagar _Sparxsys_
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.
March 9, 2023

Hi @Елена Елена 

You can create a rule on Field value changed with change type "Value deleted".

Then you can fetch issue's labels using the following SmartValue.

{{#issue.labels}}"{{.}}", {{/}}

You can search in this if the blocked label is there or not and then take some action on that.

I hope it helps.

Ravi

Ravi Sagar _Sparxsys_
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.
March 9, 2023

Or you can use an if condition.

Labels "contains none of" blocked

Like Елена Елена likes this
Елена Елена
Contributor
March 9, 2023

It works

Елена Елена
Contributor
March 10, 2023

It works but I got message when I removed any label, I want to get the message when I remove only Blocked label

Елена Елена
Contributor
March 10, 2023

I don't know how to use SmartValues

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.
March 10, 2023

Hi @Елена Елена 

Perhaps if you post images of your entire automation rule and the audit log details showing the rule execution, that will provide context for the community to help.

And if you are new to automation, please review this documentation and examples:

Kind regards,
Bill

Елена Елена
Contributor
March 11, 2023

Thanks, Bill

I tried 2 options

Option 1 - It doesn't work

 

103918.png

Option 2 - I receive notifications from when I add or remove labels for issues which don't have Blocked label

103613.png

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.
March 11, 2023

For your scenario, fieldChange is not detecting the label change.  Instead please try explicitly checking the field with {{changelog.labels}} such as with this:

Capture.PNG

Like # people like this
Елена Елена
Contributor
March 13, 2023

It seems to work

Like Bill Sheboy likes this
Bernhard Doleschel (Ease Solutions)
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.
February 15, 2024

For me this process did not worked. Changed flow (step 3) works (I´ve tested for "Suspect" label):

image.png

Suggest an answer

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

Atlassian Community Events