Skip to main content

A scripted field shows no value

Why a Script Master scripted field stays empty on a work item, and how to find the reason.

Symptom​

A Scripted Number, String, User, DateTime or Date field shows no value on a work item, in search results or in a list.

Find the cause​

  1. In Script Master, open the Custom Fields tab and find the field.
  2. Open the field's script and run Preview on work items on the work item that shows no value. The preview shows the error, if there is one.

No Companion App is connected​

Cause: Scripted fields run in your Companion App. Without one, every field stays empty.

Solution: See Server-side modules show "Action Required".

The app version is outdated​

Cause: The version of Script Master on your site has been retired. Retired versions don't compute scripted fields, so every field stays empty.

Solution: Approve the update. See "This version is outdated".

The script fails​

Cause: The script throws an error for this work item, or returns a value of the wrong type. For example, a Scripted Number Field must return a number, and the error says Number field should return number.

Solution: Fix the script and check it with the preview before you save. See Preview a field on work items.

The script takes too long​

Cause: Jira stops waiting after about 25 seconds and shows no value. The preview reports a work item that takes over 22 seconds.

Solution: Make fewer requests in the script, for example one search instead of a request per linked work item.

The field has no script for this context​

Cause: Each field context has its own script. The work item's space or work type uses a context with no script saved.

Solution: Open the field's contexts in Jira and add a script to the context that applies. See Create a scripted field.

Too many values at once​

Cause: Jira asks for a field's values in batches. When one field gets more than about 10 batches in 20 seconds, for example during a large search or export, the extra batches get no value.

Solution: Reload the page or run the search again a little later.