Hi Team,
(issue.getAsString("Issue Type") == "Change Request" || issue.getAsString("Issue Type") =="Bug") && (issue.getAsString("customfield_10204") != "APAC Fulfillment Implementation" || "APAC Support" || "APAC System Automation Implementation")
When I try to exclude the custom field values (in the condition) to set the field in the workflow post function, the "!=" operator doesn't seem to work. Is anything making a mistake here?
The issue is in "OR" conditions in this block:
(issue.getAsString("customfield_10204") != "APAC Fulfillment Implementation" || "APAC Support" || "APAC System Automation Implementation")
For each value, you need to add "not equal" part to the left side:
(issue.getAsString("customfield_10204") != "APAC Fulfillment Implementation" || issue.getAsString("customfield_10204") != "APAC Support" || issue.getAsString("customfield_10204") != "APAC System Automation Implementation")
By the way (I didn't try but it should work since it is a Groovy condition), you can simplify this part as:
issue.getAsString("customfield_10204") not in ["APAC Fulfillment Implementation", "APAC Support", "APAC System Automation Implementation"]
HI @Salih Tuç ,
This is working as expected.
issue.getAsString("customfield_10204") not in ["APAC Fulfillment Implementation", "APAC Support", "APAC System Automation Implementation"]
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.