Hello,
I'm trying to setup an automation rule so that when a custom field UC Approved By (cf[12959]) is edited, if UC Approver (cf[12858] multi-user picker field) values equals UC Approved By (cf[12959] multi-user picker field) values, then edit UC Approved and UC Status. However, the automation rule keeps throwing an error: "IF or ELSE: Add condition options"..."Unexpected error while executing rule."
I've tried using the customfield_id and custom field name. I've tried quite a few things and sadly lost many hours before finally reaching out for help. TIA!
Hi @Stewart_ Emily _ Global D_T
There is no automation list sort function, although there is an open suggestion to add that function.
For your scenario:
GIVEN an issue with multiple-select, user picker custom fields: "UC Approved By" and "UC Approver"
WHEN "UC Approved By" changes
AND the selected values in both fields match
THEN edit custom fields UC Approved and UC Status
One possible workaround is to use dynamic regular expressions to compare the values after removing any matches, testing in both directions (to avoid any subsets for one field in the other).
Kind regards,
Bill
Thanks, Bill. I think you overestimate my abilities and would greatly appreciate more information about your suggested workaround. I modified the rule to put the condition on the WHEN and removed the sort, join, etc. part of each smart value, but I'm still getting the same error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No worries, as we all are learning...especially as automation rules features evolve :^)
I did a quick test, and found that behind the scenes, Jira appears to return the users in a multiple-selection user field in ascending order by account ID to an automation rule. If that is reliable, the condition you show should work.
I wonder if the problem is using the condition in the trigger...as that new feature has been shown to have problems with timing (i.e., how fast the rule gets the data).
Let's try this version of the rule, adding some writes to the audit log to confirm the behavior is as expected:
UC Approved By: {{issue.customfield_12959.accountId}}
UC Approver : {{issue.customfield_12858.accountId}}
Please try that rule, reviewing the audit log to confirm the values have what you expected.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hooray! I reconfigured the rule as you suggested, confirmed the two logs matched, and still got the error; however, then I removed the branch before the last If-Then duo, and it worked. Thank you so much!
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!
And...that branch type should not have caused that symptom. I hypothesize something got "glitched" behind the scenes, and removing the branch solved this because...
When a rule is edited / published too many times, the stored rule JSON can get bent / broken, resulting in weird errors. The two ways to check this are:
#1) Disable the rule, wait a full minute, re-enable it, and test again. If that does not work...
#2) Disable the rule, re-create it from scratch, and test. If it works, delete the original / broken rule.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would create a email component before your if statements to see what values are being returned, that might help you debug it.
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.