Hi Experts.
I need the exact match search for labels in JIRA automation using smart value.
The following expression was used in the adding a comment action and it returns none while my JIRA issue has the label "abc-def".
"match abc-def"={{issue.labels.match("abc-def")}}
How should I compose the smart value for labels to accomplish exact match search?
What's the possible reason Why the match function does not work?
The doc I referenced is https://confluence.atlassian.com/automation0902/jira-smart-values-text-fields-1431247611.html
Thanks a lot.
Mary
Hello @Xiaoli
The match() function in Jira automation for labels might not support exact matching as intended in some versions.
Instead, you can use smart value expressions like {{#issue.labels}}{{.}} {{/issue.labels}} to evaluate and compare labels programmatically.
Alternatively, use JQL queries with precise conditions if supported by your setup.
Thanks a lot. Sahir.
I am using this match search to compose the comments in the commenting on issue action.
{{#IF(and(equals(issue.labels.join(",").indexOf("abc-def"),-1), equals(issue.labels.join(",").indexOf("cdp-updates"),-1)))}}
Please add the label of .....
{{/}}
But when there's label contains "abc-def" or "cdp-updates" like "abc-def-1" or "cdp-updates-dee", it will passed the IF and get the comment part within it which is not expected.
Any ideas how I can achieve this in the comment body?
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.