Hello,
i am looking for adding workflow condition using scriptrunner validator in jira.
use case - custom field A and parent field will decide nature of the error message. Both are drop down field.
- if custom field A == option 1 && parent == Null >> show error
- if custom field A == option 1 && parent != Null >> pass
- if custom field A == option 2 && parent == Null >> pass
- if custom field A == option 2 && parent != Null >> show error
i am trying below condition but it is not working as is
if(issue.customfield_.value == "option 1" && issue.parent != null){
return true
}else if(issue.customfield_.value != "option 1" && issue.parent != null){
return true
}
else {
return false
}
it is not working for conditions when custom field value != option 1.
any one help with logic i am missing here. Thanks