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.FieldBehaviours
import com.onresolve.jira.groovy.user.FormField
import groovy.transform.BaseScript
@BaseScript FieldBehaviours fieldBehaviours
FormField requiredField = getFieldById("customfield_12345")
requiredField.setRequired(true)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.