Hi All,
i try to use the following expression in a JQL condition of my automation:
{{issue.summary.match(".*("Verification of correctness by Legal").*")}}
I receive the following error-message:
Failed to get value for issue.summary.match(".*("Verification of correctness by Legal").*"): {{issue.summary.match(".*("Verification of correctness by Legal").*")}}
Does anyone have an idea how to fix that?
Thanks for your help, Luca
Welcome to the community !!
Did you try using simple JQL like summary ~ "\"Verification of correctness by Legal\""
More details about match is described in https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/#match--
Hey @Luca Tuchtefeld ,
Try removing quotation marks next to the string you're trying to find/match.
So, try just this:
{{issue.summary.match(".*(Verification of correctness by Legal).*")}}
Cheers,
Tobi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tobi!
I tried this already. If I remove them, it tells me that "of" is a protected jira term. If I remove the quotation marks and "of":
{{issue.summary.match(".*(Verification correctness by Legal).*")}}
it tells me:
"(key IN (PLCB-46) AND ())" - Error in the JQL Query: Expecting a field name but got ')'. You must surround ')' in quotation marks to use it as a field name. (line 1, character 24)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Luca Tuchtefeld -- Welcome to the Atlassian Community!
Adding to the suggestion from @Tomislav Tobijas ...
You are trying to use the result of that match in a JQL statement, and so it must be enclosed in quotation marks. That could be done in various ways, including adding the asJsonString function at the end: https://confluence.atlassian.com/automation/jira-smart-values-json-functions-993924865.html
However, as this is static text you are trying to match in the Summary field, testing directly may be better than using a JQL condition. For example, using an Advanced Compare Condition and checking if the results of the match are not empty.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you share screen shot of the automation rule that you have written so far?
if your objective is to check if the summary contains the sentence "Verification of correctness by Legal", why can't use an if block with contains conditions instead of a RegEx?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vishal,
I need to use the smart values because I would like to use an OR condition to check if the summary contains X or Y. For now I didnt include that because first I would need to get this formula running.
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.
I did:
{{issue.summary}} matches .*(Verification correctness by Legal).*
Received:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i am able to replicate your error with the 2nd control in the below screen shot.
Are you sure you are using the 1st one shown in the screen shot i.e. compare two values?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Vishal Biyani The only difference is the "of", right? I took out the "of" of the expression but also out of the issue summary, so this shouldnt cause a problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
are you using "compare two values"?
please don't use issue matches JQL. that will fail
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.