I am struggling with a case, where I would like an automation rule to trigger if a certain label was added. I can use the "field value changed" trigger, but this doesn't allow to check if some specific label was added or removed. How do I do this?
Hey @flaimo - you are almost there!
When: Value changes for "Labels"
If: Labels contain any of (Label of your choice)
Then: Actions you want performed
this doesn't work. it triggers every time, regardless if the label was added, or if it was already there before (and the rule was triggered because another label was added).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It will always be triggered because a value changed - the important thing here is if the IF condition kicked in or not :) do you mind sharing your current recipe?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Misunderstood the issue at hand - I figured it out:
So you basically have to make a double IF check here comparing the fieldChanged before and exclude it from the trigger if it was already there.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This does not work for me; would someone be able to provide guidance?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I had to use {{fromString}} to make it work. This has probably changed since 2020.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you use fromString, you may risk having a "true" condition if there is a label that contains all the text of the string you're checking.
Eg: For_qa_validation in labels, if you check for qa_validation it would still match although there is no label with just "qa_validation.
I was trying to use the raw value {{fieldChange.from}}, but it does not seem to do the trick now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How do I add the "And: compare two values checks if" in Jira Prem? is that possibale?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is a fieldChange object contents:
ChangeItemBean{fieldId='labels', field='labels', fieldType='null', from='null', fromString='', to='null', toString='test'}
Just leaving this here, cause i needed it to understand the mechanism.
Thanks for the solution people, it really helped.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, @flaimo @Norberto Henriques
We have Jira Server version.
I would like to send Slack msg to a Slack channel, when I add/set Label- "X" to an existing (not in creation of a ticket) Jira ticket (notthnaks.
which solution should I use? is it possible w/o automation add on?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey there!
I had an issue with {{fieldChange}} and automation. I'm trying to add a comment when a specified label is added. I tried to use {{filedChange}} and access different values, but the object and values are always empty. Something has been changed or it's an error?
Regards,
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I found a solution to the problem I had. In my case {{fieldChange.toString}} worked.
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.