Need this to work on customer request type, creation.
I have two fields on the customer request type
"Is a Supervisor?" Select List (single choice)
"Client Name " Text field (single line)
If Is a Supervisor? = N the Client Name field is required, otherwise it is an optional field
Using Scriptrunner behaviour
I create the following, and it requires the field, but it requires it all the time. Appreciate any help.
Mapped to specific JSM project and Customer Type
Guide workflow is set
INitialiser:
import com.atlassian.jira.issue.resolution.Resolution
def dropDownCF = getFieldByName('Is a Supervisor?')
def requiredCF = getFieldByName('Client Name')
def valueCF = getFieldByName('Is a Supervisor?').value
if (valueCF == "No") {
requiredCF.setRequired(true);
} else {
requiredCF.setRequired(false);
}
Data Center
JIRA 8.20.1
JSM 4.20.1
ScriptRunner 6.39.0
HI Deborah,
You will need an add-on like the ScriptRunner Behaviours app.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not just ScriptRunner, but the Behaviours app.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am not using the cloud version - i am on the data center version. sorry if i did not tag this correctly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh - sorry, I missed that. I am not sure if Behaviours is included in the DC version of ScriptRunner or if it a separate app. But you will need to solve with the Behaviours tool.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.