Set a mutiselect list custom field value as mandatory

Use a ScriptRunner post function to set a custom field value. The documentation shows how to set a default value for a select list.

Step-by-step guide

  1. Type '.' and then Behaviours
  2. Type in the name of your Behaviour (call it say "Select List - multiple mandatory")
  3. Add a new behaviour
  4. Choose the Fields link
  5. Create initialiser and use the code in the block below
  6. Or if you don't wish to use the code - choose to "Add the field and mark it as mandatory"

// Get a pointer to both my fields
def demoSelect = getFieldByName("Demo Select List")
def demoMultiTxt = getFieldByName("Demo Multi Line Text Field")
// Get the Value of the Select List Field
def selectedVal = demoSelect.getValue()
if (selectedVal != null){
  • Replace "Demo Select List" with the actual name of your select list custom field
  • Using the code is recommended over the GUI of adding a field since you can add conditions and much more in the future