I want to make custom field as mandatory by using groovy script code.Please help me on that. Intitially dont have code how to write.
Hi, @Rudraiah B
If I understood you right, you are using ScriptRunner with groovy scripts.
In ScriptRunner it can be made with Behaviours. You have to add new Behaviour, map it to Project and Issue type.
Then add initializer script, like:
import com.onresolve.jira.groovy.user.FieldBehavioursimport com.onresolve.jira.groovy.user.FormFieldimport groovy.transform.BaseScriptBaseScript FieldBehaviours fieldBehavioursFormField requiredField = getFieldById("customfield_12345")requiredField.setRequired(true)
It looks like you're new here. Sign in or register to get started.