I want to make a JIRA automation that does the following:
At creation of an issue, if the description contains a 7 digit number in (), move that number from description to the custom field named IMO Number
Se pictures.
{{#issue.description.matches("\\((\\d{7})\\)")}}{{issue.description.matches("\\((\\d{7})\\)")[0].group(1)}}{{/}}
For Jira Cloud automation rules, please see this documentation for the match() function and its use of regular expressions:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/#match--
The match() function returns a list of matches. To access a specific one, please use the get() function for a list:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-lists/#list.get-index-
Kind regards,
Bill
According to documentation on regex and Jira, you needn't escape the curved brackets::
Regex validation | Atlassian Support | Atlassian Documentation
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.