Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to remove all the options of a select list custom field using behaviours (Script Runner)

SWAPNIL SRIVASTAV November 8, 2019

How to remove all the options of a select list custom field using behaviours (Script Runner).

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Alejandro Suárez - TecnoFor
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
November 9, 2019

Hi @SWAPNIL SRIVASTAV 

You could simply do this (you can put this in the initializer script):

import com.onresolve.jira.groovy.user.FieldBehaviours
import com.onresolve.jira.groovy.user.FormField
import groovy.transform.BaseScript

@BaseScript FieldBehaviours fieldBehaviours

FormField ffPruebaSL = getFieldById("customfield_10201") // Change with your field ID

ffPruebaSL.setFieldOptions([:])
// If you want the "None" Option to be available uncomment the following line and comment the previous one
//ffPruebaSL.setFieldOptions(["0":"None"])
TAGS
AUG Leaders

Atlassian Community Events