Trying to setup an automation with a condition where field A contains 1 to many strings... this JQL doesnt work, and the field condition allows to enter only one string.
Is there a more efficient way for doing this? Can you add multiple strings to a field condition? Comma separated? Or a JQL for 'Contains'?
Field A is also a custom field, text.
("Account Type" = "New Lead Bookings" OR "Account Type" = "Top of Funnel" OR "Account Type" = "New Lead CSM/Ecomm" OR "Account Type" = "New Lead TOF Restaurants" OR "Account Type" = "New Lead Restaurants")
Hi @siond
For a question like this, please consider posting images of your complete rule and the audit log, showing and details. Those may provide context for the community to offer help. Thanks!
What is the type of your field: text, single-select, multiple-select, etc.?
Kind regards,
Bill
Looks like a whole list of if/else blocks are my only option? Seems inefficient, and I would have to create a block for every string like this....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What type of field is Account Type?
Perhaps this syntax would work better:
"Account Type" IN ("New Lead Bookings", "Top of Funnel", "New Lead CSM/Ecomm", "New Lead TOF Restaurants", "New Lead Restaurants")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It appears from the rule error that EQUALS = did not work, so perhaps try CONTAINS ~ in a stand-alone query first to see if that works for the text field: https://support.atlassian.com/jira-software-cloud/docs/advanced-search-reference-jql-operators/#Advancedsearchingoperatorsreference-CONTAINS-CONTAINS--
("Account Type" ~ "New Lead Bookings" OR "Account Type" ~ "Top of Funnel" OR "Account Type" ~ "New Lead CSM/Ecomm" OR "Account Type" ~ "New Lead TOF Restaurants" OR "Account Type" ~ "New Lead Restaurants")
You may also do this with advanced compare condition with a regular expression:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The operator '~' is not supported by the 'Account Type' field Doh!
Love the idea about the regex never used that before, although it's not working arrrgghh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please try the "Contains Regular Expression" option instead for that list.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I re-tested with some similar text in the description field and it worked. Would you please post an image of your advanced compare condition component in the rule?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When I tested this it was with Jira Cloud. Are you using Jira Cloud or Server/Data Center version? That image looks like it is from Server/Data Center's pro version (paid) of automation. The Server/Data Center help seems to match Cloud for the example showing this working.
Let's try to write that smart value to the audit log before the condition to confirm it contains what you expect:
START{{issue.Account Type}}END
If that shows nothing for the field, the smart value is incorrect. You can determine the correct smart value for your field using this how-to article:
https://confluence.atlassian.com/automation/smart-values-for-fields-993924665.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
YES! I had to use the custom field and it worked!
Seriously this is a gamechanger for me, I can use this regex compare for so many things!!
THANK YOU!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome! I am glad to learn that helped.
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.