Hello Team,
I am trying to create a very basic rule in Atlassian with a condition based on the issue label and work type, but for some reason the automation does not recognize the second condition
This is what is happening: I created a rule where, when a bug is created with label A, the system sends a Slack alert via webhook to a Slack channel. The second condition is that when I create a bug with label B, the system sends a Slack alert via webhook to a Slack channel.
The problem I see is that the system is not recognizing the second condition. When I create a bug issue with label B, the audit log for the rule says that the work item does not match the condition, and it refers to the condition where the label is A instead of B. but when I create a condition with label A the rule works find.
I think there is something that I am doing wrong when building this automation. I asked Rovo, but it was not able to help. Can someone help me. Thank you.
Hi Erika,
You need to use an IF/ELSE condition instead of a regular Condition for checking the label. The way you have it now, if the Label is B, it gets to the first condition looking for Label A and when that is not met, it just stops. Put in an IF/ELSE condition with the first IF condition being the check on Condition A and the ELSEIF condition being Label B.
You don't need the second Condition check for Bug because they has already been filtered out. Move the Slack message webhook actions under the appropriate Condition (A or B).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Erika Reategui,
It is always better to include a screenshot of your automation so that we can see what it looks like, it makes the answer much better.
Assuming that you are using if conditions in your automation I would say that the reason your automation never triggers on label B is that it never gets past the if condition for label A.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mikael,
I am trying to share a screenshot but the system does not allowing me. Let me try again.
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.
Okay, as I assumed the way you have configured your rule is that it will never reach label B because it will not get past the condition for label A. As @John Funk mentioned, you have to use IF/ELSE in order to do that, something like this:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, and...to the suggestions from @Mikael Sandberg and @John Funk
An if / else condition block will help when you expect only one of the values in the Labels: A or B.
However, there is no built-in restriction to prevent someone entering both Label values, A and B. What do you want to happen in that case: favor one value over the other, send both, send neither, etc.?
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.
Hello Bill Sheboy and Mikael,
Thank you for your responses. It is very frustrating communicating here, I keep getting the following error message
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Erika Reategui
From the audit log it looks like the rule stops at the first condition.
If the rule is structured like:
Condition → label = A Action → send Slack
Condition → label = B Action → send Slack
then when the first condition fails, the rule does not continue evaluating the next condition, which would explain why it always stops there.
I’d suggest restructuring it using an IF / ELSE IF block, for example:
IF label = A → send Slack message A
ELSE IF label = B → send Slack message B
That way the rule evaluates both cases properly instead of stopping after the first failed condition.
Have a great Weekend ☀️
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.