I have been trying to create a JQL query for a Jira Automation for some time now to solve the following problem.
When creating tasks a "Change" short CHN number is assigned in the Tasks Summery. The JQL query should check if this CHN number already exists in another task summery. The text in the summary should be ignored.
Example: CHN-1234 - text123
This is my last attempt and again it failed because of the following error message:
(summary ~ "CHN-\\d+.*" AND summary ~ "{{issue.summary.match('CHN-(\\d+).*')}}.*" AND issuekey != {{triggerIssue.key}}) AND (key != {{triggerIssue.key}})
Failed to get value for issue.summary.match('CHN-(\d+).*')
I have tested this query separately and it does not work there either and I really dont know why.
Please let me know, if there is any additional information needed.