Hello,
I want to create an automation that will verify the value of a field to determine to whom the issue should be assigned. The value of the custom field should contain only numbers in the format XX-XXX. I created the smart value {{issue.customFieldId_10067.match("\\d{2}-\\d{3}")}}
, but the automation isn’t working correctly – it doesn’t assign the person, even though I see "success" in the logs.
The issue you're facing is likely due to an incorrect reference to the custom field and a slight mismatch in your regular expression.
1. Instead of using {{issue.customFieldId_10067}}
, you should use {{issue.customfield_10067}}
. If the custom field is a select-type field or any field that returns a complex object, you may need to append an attribute like .value
, resulting in something like {{issue.customfield_10067.value}}
.
For more details on how to correctly reference smart values, please refer to Atlassian's documentation: Automation smart values - issues | Cloud automation | Atlassian Support.
2. Your current regex \d{2}-\d{3}
matches the pattern but doesn't enforce it for the entire string. To ensure the entire value strictly matches the format, you should use this regex:
^\d{2}-\d{3}$
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It seems there is a misconfiguration in your smart value. The Id characters part should be in the smart value clause.
Can you try this.
{{issue.customfield_10067.match("\\d{2}-\\d{3}")}}
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.