Calling all automation gurus...
So I'm building an automation using the advanced compare condition to perform a pattern match on the last comment. Basically I want to transition an issue to in progress if the last comment contains any of a certain number of words. However at the advance compare condition seems to only have the "all match" capability. As shown below ideally I could choose if any match. I know I can do if/else block but that seems so inefficient.
ugh.... will load image later. The community app does not like safari and won't allow me to load an image. Driving me crazy. :(
How about an advanced compare condition using a regular expression?
You will need to refine that expression if you want whole words only, case-sensitive, etc.
Kind regards,
Bill
thanks Bill!
so here is what i currently have
so applying your guidance I would use the following...
but not sure I get the use of "does not equal" and "empty". I think I am misunderstanding here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That match() function will return any matches found for the regular expression. If any of them are found, the result "does not equal" empty...so proceed with processing. I tested this way and it seems to work.
I believe another way to do this is invert it, and put a regular expression in the second value and try for a match rather than no-match.
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.
Late to the party, but...
OPTION 1: Some OR conditional functionality is built-in to some conditionals. Example: "is one of" option in the "Issue fields condition". That can check, for example, if the Assignee is Mary or Bob.
OPTION 2: When there is no built-in support, the smart value or() function provides a messy but functional alternative:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/#or
Sample use case: A rule triggers on a new Comment added to an issue, and I want to proceed only if it was Mary or Bob who added the comment. The "Issue fields condition" doesn't provide access to the comment author (it's not a standard or custom field for an issue).
So I'll use a "Smart values condition" instead:
It's a bit brittle, as the user name is in text form (whereas the OPTION 1 approach above relies on user ID values internally).
You could check against just comment.author if you knew the user ID value, but that would make your rule much less readable -- my Cloud user ID is 43 characters of nonsense.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also, the "If/then/else" conditional in Jira Cloud now has an option for AND vs OR with the configured conditions:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.