Bulk Initialization of Scripted Field Values

Hi there,

I’m transitioning from Jira Server to Cloud and am in the process of reconfiguring my settings.
I have a scripted field that calculates the number of days since the last transition. The field updates correctly when I view an issue, changing from null to the accurate number of days.

However, I’m encountering issues with initializing this field for existing issues in bulk.
I tried the following methods:

  1. Bulk Edit Directly on the Scripted Field:
  • I attempted to bulk edit the scripted field values by setting them to -1 or 0.
  • Result: The field is updated to -1 (or 0), but the scripted calculation is not triggered. When I view the issue, the field correctly updates to the computed value.
  1. Bulk Edit Another Field:
  • I tried editing a different ■■■■■ field.
  • Result: The issue persists; the scripted field does not compute unless I manually view the issue page.

It seems that the bulk edit operations do not trigger the computation of the scripted field. Could you provide guidance on how to ensure that the scripted field values are properly initialized and computed for existing issues?

Thank you for your assistance

Hi Nicolas,

At the moment, Scripted Fields only updates on issue view. However, we’re working on a solution so it wil also update every time an issue is updated, through a bulk edit or any other type of edit on any field within the issue.

We’ll let you know once this becomes available on the product.

Thank you,
The ScriptRunner for Jira Cloud team

Hi @nicolasPR, adding to what @mbarrios has mentioned.

The workaround is not ideal at this point of time, but it is possible to do smaller scale updates to the issues with Scripted Field (SF) using scheduled jobs.

You can script something using the get JQL Search to compute the details for the SF updates. You can play with the maxResults and paginate it if there are many issues found.

There is this knowledge base from Atlassian: Changing maxResults parameter for Jira Cloud REST API for your review as well.

Hope this helps.
-Sean