Scriptrunner's Single Custom Picker is not working in JSM form after snapshot deployment

Description

If you use Single Custom Picker field on a JSM form and deploy a snapshot containing the JSM project, after the deployment the custom (scripted) fields show up on the form as customfield_<id>. When the form is edited (Settings Projects <project_name> Request Types <request_type> Edit fields) the field setup looks correct even though it does not work. Upon DB inspection, the type of the field is set to unsupported.

Cause

In fact, Configuration Manager for Jira is working as expected. It moves the correct information about the custom field to the target instance. When the field is created in the Request Type, JSM performs field validations before creation. In one of those validations, JSM tries to map the custom field to a predefined set of supported JSM fields. Unfortunatelly, Single Custom Picker’s custom field type does not appear in the list, that JSM is checking against, returning a result of ServiceDeskFieldTypes.Undisplayable for the validation. That is why the custom fields is not working properly, and the type in the database is set to unsupported.

In conclusion, JSM’s validation is the root cause for the field to appear broken.

Workaround

Remove the problematic custom field and re-add it to the Request Type.

Notes

We have observed this problem with the following custom field types so far:

  • com.onresolve.jira.groovy.groovyrunner:single-custom-picker-cf