Hello All,
We have a field "Customer field"
We would like this field to be required when we move to Fixed state, only if another field " Impact" = "Y"
I Tried the following in Validator:
Simple scripted validator (condition apply).
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.IssueManager
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.fields.CustomField
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.customfields.option.Option
import com.opensymphony.workflow.loader.StepDescriptor
import com.onresolve.jira.groovy.user.FormField
CustomField customField_name = customFieldManager.getCustomFieldObjectByName("CMS Description for Customer");
cfValues ['customField_name'] != ''
I would think something like this should work:
cfValues['Impact'] != 'Y' || cfValues['CMS Description for Customer'] != null
If Impact is N or empty, then all is good. If it is Y, then your other field must not be empty.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.