Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Could someone explain why condition from Simple Scripted Validator don't work

Dagmara Grudzien
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 14, 2022

Dear Community,

 

I've tried to create the validator (I' need to use Simple scripted Validator), where error message pop up when issue type is Story and Severity value is Not Analysed.

 

I've put in Condition:

!issue.get("issuetype").name ["Story"] && cfValues['Severity']?.value != "Not Analysed"

 

The second part works fine by it selves:

cfValues['Severity']?.value != "Not Analysed"

Error message pop up only when Severity is Not Analysed.

 

Can someone give an advice how to combine those two conditions correctly?

 

Regards

1 answer

1 accepted

1 vote
Answer accepted
Tom Lister
Community Champion
October 14, 2022

Hi

Try the syntax

issue.issueType.name != "Story"
Dagmara Grudzien
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 14, 2022

Thank you Tom,

 

that was very helpful!

 

Actually it works with or || not with and &&:

 

issue.issueType.name != "Story" || cfValues['Severity']?.value != "Not Analysed"

Regards,

Dagmara

Suggest an answer

Log in or Sign up to answer