Hi everyone,
I’m trying to set up a Shared Action (Transition Issue) in Jira Cloud that should automatically move an issue to the status “Waiting for Approval” - but only if a specific keyword appears anywhere in the Summary (the summary contains additional text).
Example:
If the Summary contains the word “Hello”, the Conditional Validation should allow the transition; otherwise, it should block it.
Something like this:
{{ issue.fields.summary.contains == "Hello" }}--> the result should then be true (examle: Hello World / I want so say hello / ...) or false if it is not contained anywhere.
I need help writing the correct Conditional Validation expression. Unfortunately, I couldn’t find the right syntax in the documentation or other community posts.
Does anyone know what the correct expression would look like using Jira’s conditional validation language?
Thanks in advance :)
Hi
I’m Thiago, a support engineer at Appfire and I’m here to help you.
For the conditional validation, you can use the “includes” function. See the example below:
issue.summary.toLowerCase().includes("hello")
For this condition, it will match any “hello” contained in the summary, unlike the previous condition you provided, for a exact match, please use the expression below:
issue.summary == "Hello"
Please contact our support if you have any other questions about this.
You can also install this app here.
Best regards, Appfire support team.
Hi @Rebecca
Atlassian has several useful pages on smart values, but none contain the function contains.
The Jira Query Language offers the "like" operator, represented by a tilde: ~
You can automate processing issues and check them using a conditional statement based on the outcome of a query;
issue.summary~"Hello"
or
issue.summary.toLowerCase()~"hello"
to catch different variations of the theme.
Kind regards,
Dick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dick,
thank you for taking the time to look at my issue! Unfortunately, the ~ Operator won't work in JMWE nunjuck functions. I tried that and it always throws an error.
However, the solution of the appfire Team (posted above) works very well.
Thanks and kind regards
Rebecca
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.