You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
Hi Community,
I'm trying to use conditional execution in JMWE addon.
Below is the condition I'm trying on two text fields. If there is a word approved or deferred text in the field i need to execute this condition.
No luck with the below condition.
{{ issue.get("customfield_14802") == /.*Approved.*/ or issue.get("customfield_14802") == /.*Deferred.*/ }}
TIA!
Hi @Ash , you seem to want to use regular expressions in your test. In Groovy, the regex matcher operators are =~ (substring match) and ==~ (exact match). So you can try:
issue.get("customfield_14802") ==~ /.*Approved.*/ || issue.get("customfield_14802") ==~ /.*Deferred.*/
although that will also match "DisApproved" (because you didn't use a word begin/end pattern (\b) and won't match "approved" because you didn't use case-insensitive matching with (?i).
A better test would be:
issue.get("customfield_14802") =~ /(?i)\b(approved|deferred)\b/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Happy New Year! We hope you all had a safe and restful holiday season. 2020 was a unique year full of unforeseen events; however, as we enter the new year of 2021, we’re optimistic for the light at t...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.