I have a rule that I want to trigger if a certain label was added to an issue. I can do that, but the problem I'm having is that there are several labels that could be added, and 3 of them have letter combinations in common. One is for a larger program "ABCD". That program has 2 subprograms, "ABC" and "CD". Any of those could be labels, and multiple labels can be applied.
An example of a case I'm having trouble with - one rule looks for the addition of the label "CD":
Original label: "ABCD"
Updated label: "ABCD", "CD"
Here's what I'm doing.
In this case, the rule fails to add the comment because it thinks "CD" existed in the original label. Is there a way to access just the part of the label that was added? I've messed around with {{fieldChange.toString}} - {{fieldChange.fromString}} (which doesn't seem to do what I'd hoped) and now I'm heading down the rabbit hole of regular expressions, so I figured I'd ask here and see if anyone has any suggestions. (Am I missing something simple?)
---------------
FWIW, we use a Data Center instance, not Cloud. I am unable to change the names of the projects or the labels used. Also, "ABCD", "ABC", and "CD" are not the actual project names.
Hi @Robin Powell ,
The automation is set as label contains any of CD, so it checks for any label with these 2 works like ABCD and CD, both match.
The condition should read as equals CD instead of contains and that should do the trick
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.