GroovyScript - Multi Conditional Script Listener

Deleted user September 18, 2013

We have a script listener that looks for a P1 ticket, and then email's us a standard email to let us know that it was been raised and the condition we use is;

cfValues['IS Priority']*.value.contains("P1")

How can I add an extra condition to this? I would like to add an extra condition that if it is a P1 and "Custom Field = Value" then send us an email. Is is possible to add two fields into a groovy condition?

2 answers

1 accepted

1 vote
Answer accepted
RambanamP
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 18, 2013

did you tried like this?

cfValues['IS Priority']*.value.contains("P1") && cfValues['customfield Name'] == "Value"

or 

cfValues['IS Priority']*.value.contains("P1") && cfValues['customfield Name'].value == "Value"

0 votes
Bharadwaj Jannu
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 18, 2013

hello Ashley Powell,

check this once https://answers.atlassian.com/questions/171513/syntax-for-multiple-conditions-and-additional-actions-in-script-clones-an-issue-and-links

and

https://jamieechlin.atlassian.net/wiki/display/GRV/Built-In+Scripts#Built-InScripts-ConditionTester

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events