Release 5.4.x

5.4.49

  • Released 13 Feb 2019.

New Features

Edit Scripts Permission and Settings Page

Now you are able to configure which groups with Jira Administrator permissions can create or edit ScriptRunner scripts. See documentation.

Bug Fixes

  • [SRJIRA-2976] - No compile context for UpdateBlockedIssues in registry
  • [SRJIRA-3089] - ScriptRunner IntelliJ Plugin does not provide link to accept SSL certificate as shown in guide
  • [SRJIRA-3294] - Default descriptions with Behaviours do not work in version 5.4.48

5.4.48

  • Released 30 Jan 2019.

History of Execution Times and Failures Rates

Previously, for each script, we have displayed information about the previous fifteen executions. This includes how long it took, the payload, and whether it failed or not.

This can be useful but doesn’t give you a long-term trend analysis - for example, is this gradually slowing down, perhaps as it processes more data? Has a recent change to the script caused it to slow down (or speed up)?

Example History of Execution Times and Failure Rate data.

With this release we show execution speed and failure rates going back up to two years. Initially there will be no data available, but over time this should become a valuable resource.

Inclusion of Canned Comments Plugin

This release sees the inclusion of Template Comments for Jira Service Desk in ScriptRunner for Jira. This will enable us to better keep it up to date. By default this is disabled, as since it was introduced Service Desk provides a different method of achieving a similar thing. On installing this upgrade, if you have the Template Comments app installed, it will automatically be uninstalled…​ the functionality is the same so you should not notice any difference.

See the documentation for more information.

Important: There is a known issue that the resources are not correctly enabled if you had previously installed the Template Comments plugin. This is the issue: SRJIRA-3263. To work around this go to Built-in Scripts → Service Desk template comments, then click Disable, then Enable.

Bug Fixes

  • [SRJIRA-2944] - Copy Project script does not copy the field names of customer request types
  • [SRJIRA-2993] - Can't delete Behaviour mapping with a null Issue Type

5.4.47

  • Released 16 Jan 2019.

Bug Fixes

Fixed issue with upgrading that causes missing scripts.

  • [SRJIRA-3002] - Empty message dialogs using Script Runner together with Secure Login
  • [SRJIRA-3092] - ScriptRunner IntelliJ Plugin shows http 500 error if user has not entered text into script console first

5.4.45

  • Released 18 Dec 2018.

Change to Behaviours' getValue() Output on Linked Issues Field

Prior Behaviour

There was some inconsistency in the object type which getValue() returned when called on the Linked Issues field (i.e. getFieldById("issuelinks-issues")).

The Issue field is highlighted in an example configuration.

  • If the field contains no issues: ""

  • If the field contains one issue: "ISSUE_KEY"

  • If the field contains multiple issues: [FIRST_ISSUE_KEY, SECOND_ISSUE_KEY, etc.]

Notice the differences in the object types. Two are strings, one is an array.

New Behaviour

As of this release, getValue() will always return an array for the Linked Issues field. This new behaviour is documented in the Behaviours API Quick Reference.

We are aware that this change will break backwards compatibility for some users. Take a look at the new outputs below to see what adjustments you need to make to your scripts.

  • If the field contains no issues: []

  • If the field contains one issue: [ISSUE_KEY]

  • If the field contains multiple issues: [FIRST_ISSUE_KEY, SECOND_ISSUE_KEY, etc.]

Bug Fixes

  • [SRJIRA-2393] - Clearing cache event, even once, creates performance issues for Change Shared Entity Owner script
  • [SRJIRA-2900] - Behaviours getValue() on Linked Issues field not returning consistent object type
  • [SRJIRA-2966] - Create issue in new tab fails to create issue if behavior takes too long
  • [SRJIRA-2968] - Autocomplete for script file paths repositions certain numerical prefixes
  • [SRJIRA-2991] - Cannot disable post function on Create step
  • [SRJIRA-3003] - dateCompare can produce an HTTP 400 (Bad Request) with error jqlTooComplex
  • [SRJIRA-3124] - Accessing undefined this._input element on Firefox v52 and v60
  • [SRJIRA-2979] - Group and multi-group scripted fields

5.4.43

  • Released 22 Nov 2018.

Bug Fixes

  • Fixed issue with upgrading that causes missing scripts.
  • This release also contains other bug fixes.

5.4.42

  • Released 22 Nov 2018.

Bug Fixes

  • [SRJIRA-2911] - Clone Issue throws MissingMethodException because of classloader issues
  • [SRJIRA-3102] - Issue Picker field - does not allow JQL to return subtasks
  • [SRJIRA-2924] - Behaviour set in an initializer fails after a server side validation failure
  • [SRJIRA-2949] - Behaviours timer for checking certain fields is never stopped
  • [SRJIRA-2987] - Script Registry is unable to resolve classes located in script roots directory
  • [SRJIRA-3074] - Renaming a user prevents user picker field from being set with behaviours in JSD portal
  • [SRJIRA-3084] - Conditional Behaviours Don???t Work Correctly When Switching Users

5.4.40

  • Released 13 Nov 2018.

Bug Fixes

  • [SRJIRA-3094] - Clone Issue and Create Subtasks breaks when custom field has no context

5.4.39

  • Released 08 Nov 2018. 

New Features

Restrict Available Issue Types

You can now use Behaviours to restrict which issue types are available to different categories of users. This could be based on group or role membership for instance, and could be used to prevent for example, users in the Customers role creating Bug tickets, and restrict them only to Support Request issue type.

Add to Agile Board Context Menu

You can now add items to the context menu when you right-click on issue or issues in the planning or sprint boards. As with other web items you have the option of calling a REST endpoint which can cause a flag or dialog to be displayed (or have no visible output), or linking to another page. You can also add commonly-used actions that are available through the "dot" menu to the context menu, for example Create sub-task, Clone issue, and so on.


Bug Fixes

  • Fixed regression when editing code which caused the UI to crash.

5.4.38

  • Released 08 Nov 2018.

Bug Fixes

  • [SRJIRA-3013] - Jira agile context menu option for web items
  • [SRJIRA-1010] - Cannot customize proposed issue types using behaviours
  • [SRJIRA-2375] - Expression JQL function doesn't work with user-picker custom fields
  • [SRJIRA-2734] - Behaviour description is cleared after clicking the Advanced Edit operation
  • [SRJIRA-2954] - Setting readonly on a single user select field on Service Desk makes the field look hidden in the portal view
  • [SRJIRA-3006] - 'Change dashboard or filter ownership' conflates user names and user keys
  • [SRJIRA-3069] - Behaviours group condition doesn't check for anon users
  • [SRJIRA-3076] - WorkflowUtils.updateIssue says "transition" in its error message rather than "update"
  • [SRJIRA-3077] - File attached with the ON predicate can produce incorrect results
  • [SRJIRA-1046] - Disable Jira's dirty form checking for fields that have been set through behaviour setValue

5.4.34

  • Released 24 Oct 2018.

Script JQL Functions are now Singletons

If you only use the JQL functions included in ScriptRunner this won’t affect you, but if you have written your own, please read on.

We have fixed a couple of race conditions in JQL functions that may have caused problems under extreme load. JQL function classes are now only instantiated once. This may cause a problem if you have written your function class to have state, e.g. shared fields that are written from the validate method and read from the getQuery method. In the unlikely event this is the case, please refactor your JQL function.

Version Synchronizer Delete Behaviour Modified for Deleting and Swapping to Missing Versions

When a version is deleted, you can specify the actions to be taken for issues associated with the version to be deleted. One of the options is to associate these issues with another version. A new option has been added to control the propagation of these events with the Version Synchronizer:

Previously, on a Version Deleted event, if there was a version in the swap that was not present in the source project, the version in the destination project would be deleted, and there was no control over that functionality. That could potentially lead to an unintended loss of information, imagine the following scenario:

Project A has versions 1 and 2, and Project B has version 1, but it does not have version 2.

The Version Synchronizer event listener is active with source project A and destination project B.

If a delete version event is called in project A, and in that event, it is specified that version 1 is to be deleted and swapped with version 2, that would work in project A because both versions exist. However, when that event is propagated through the Version Sync Listener to project B, it would delete version 1, and it wouldn't swap to version 2, because version 2 does not exist.

That could lead to a loss of information in project B.

In order to prevent this loss of information, the default behaviour has been modified to copy the version to the target project if it is not contained in that project. In the previous scenario, the new Version Synchronizer would realize the version that the user wants to swap to is missing in the target project, and it would create it there. That way the swap can be completed successfully and there is no information lost.

Bug Fixes

  • [SRJIRA-2377] - Default custom field values not set in sub-task created by 'Create Sub-task' post-function
  • [SRJIRA-2788] - Issue type field does not respond to setFormValue or setRequired (etc) in Behaviours
  • [SRJIRA-2810] - Behaviours setRequired considers "None" as a valid selection for select lists in JSD??portal
  • [SRJIRA-2916] - Return full datetime when outputting scripted fields to JSON
  • [SRJIRA-2935] - Mapping behaviour to specific SD without selecting request types doesn't show an error
  • [SRJIRA-2947] - Memory Issues with IssueFunction in dateCompare("", "resolutionDate < dueDate") with high load
  • [SRJIRA-2887] - Combined postfunction/listener send message to Slack Stride or Hipchat
  • [SRJIRA-2973] - More Advanced Handling for Version Synchronizer Deletion
  • [SRJIRA-2933] - ScriptRunner IntelliJ plugin compatibility with 2018.2

5.4.30

  • Released 24 Sep 2018.

Bug Fixes

  • [SRPLAT-77] - Race condition when using WithPlugin
  • [SRJIRA-2667] - JSD Behaviours do not work with Select List Conversions
  • [SRJIRA-2923] - 'Attachments' not available as option for 'Fields to Copy"

5.4.28

New Features

Issue and Remote Issue Pickers

Previously you could convert text fields to issue pickers…​ the problem with this is that the "view issue" renderer had room for improvement, and that when using the API you were returned plain text strings. With this release we are introducing proper local and remote issue pickers, with full Behaviours support.

Commented and lastComment Visibility Predicate

Commented and LastComment now support searching on JSD comment visibility. You will need to reindex Jira in order to use this. See the documentation.

New option to prevent impersonation of Jira System Administrators

Admin users have not been able to switch to a system admin for a long while, now we have added an option to prevent Systems Administrators from impersonating other System Admins. This feature is optional, and you can find out how to enable it in the Switch User Documentation Page

Workflow Transition Buttons

As part of the Send Mail built-in script, the email template field now includes getWorkflowButtons in its binding. This closure is called using getWorkflowButtons.call() and adds a button to the email body for every valid transition given the issue’s current state. Example output:

Bug Fixes

  • [SRJIRA-2906] - Show numerical IDs next to workflow actions when editing a behaviour condition
  • [SRJIRA-2414] - Script Listeners Don't Show New Events
  • [SRJIRA-2738] - Behaviours don't preset or lock issue type field
  • [SRJIRA-2809] - Calling setRequired() on a RadioButton or CheckBox in SD portal doesn't remove (optional) text from UI
  • [SRJIRA-2937] - Rich text fields bypass read-only setting when changing edit modes/settings
  • [SRJIRA-2981] - Previous Status condition: Immediately Previous setting cannot be disabled once enabled
  • [SRJIRA-2668] - Add a Script Fields Template for Dates without timestamps
  • [SRJIRA-2928] - Provide an analogue to 'approval.buttons' in the custom email bindings
  • [SRJIRA-2948] - Optionally prevent System Administrators impersonating other System Administrators.
  • [SRJIRA-2579] - Script Registry Improvements/Fixes

5.4.27

  • Released 24 Sep 2018.

Bug Fixes

  • [SRJIRA-2132] - Filter by Jira Service Desk comment visibility using lastComment and commented JQL functions
  • [SRJIRA-2718] - Copy custom field values built-in sets wrong options with lossy field conversions
  • [SRJIRA-2789] - History Results in Escalation Services
  • [SRJIRA-2807] - ScriptRunner IDEA Integration 2018.1 compatibility
  • [SRJIRA-2817] - Listeners fail after project key change
  • [SRJIRA-2818] - Parent Issue Script Field does not display value through rest API
  • [SRJIRA-2871] - View in issue navigator does not work in the Kanban backlog
  • [SRJIRA-2885] - Behaviour doesn't run when clearing Epic Link field
  • [SRJIRA-2888] - hideTab(String) hides the wrong tab if an earlier tab has been hidden by Jira itself
  • [SRJIRA-2889] - AbstractEntityMatch doesn't respect permissions overrides
  • [SRJIRA-2905] - Send Email on Transition sends to inactive accounts
  • [SRJIRA-2922] - If no issue type avatar or default avatar - behaviours admin break
  • [SRJIRA-1921] - Display note on scripted post-functions to distinguish them more easily
  • [SRJIRA-2543] - Create Subtasks: Include option "none" in fields to copy
  • [SRJIRA-2545] - Add support for CommentLevel to the setFieldOptions method in Behaviours
  • [SRJIRA-2870] - setLabel() and setDescription() doesn't work on checkbox/radio button in customer portal
  • [SRJIRA-2836] - formField.setDescription() doesn't work on Issue Type field
  • [SRJIRA-2809] - Calling setRequired() on a RadioButton or CheckBox in SD portal doesn't remove (optional) text from UI
  • [SRJIRA-2932] - Use JQL input field component in scripts

5.4.12

Bug Fixes

5.4.11

  • Released 25 June 2018.

Bug Fixes

  • [SRJIRA-2582] - Execution Information Doesn't Get Updated Correctly
  • [SRJIRA-2678] - Cannot cast com.onresolve.scriptrunner.canned.jira.utils.ConditionCustomScriptDelegate to com.onresolve.scriptrunner.canned.jira.utils.CustomScriptDelegate
  • [SRJIRA-2849] - ON server validation setForm does not work s expected
  • [SRJIRA-2852] - addedAfterSprintStart returns only non-done issues when sprint is closed
  • [SRJIRA-2863] - Script registry throws NPE if you have unscripted web fragments
  • [SRJIRA-2868] - ScriptRunner broken in Automation
  • [SRJIRA-2872] - completeInSprint JQL Function Returns Incorrect Values
  • [SRJIRA-2875] - Previewing the Script Registry produces a JS error
  • [SRJIRA-2877] - Field becomes read-only when created on top of area where that field is read-only

5.4.7

  • Released 31 May 2018.
  • Compatible with Jira 7.10.x

Bug Fixes

  • [SRPLAT-266] - Builtin scripts documentation broken codeboxes for AfterCreateActions
  • [SRJIRA-2829] - ScriptRunner compatible with Jira 7.10.0 and SD 3.13.0
  • [SRJIRA-2733] - Behaviours do not load on SD support portal for some users
  • [SRJIRA-2707] - Add Distinguishing Features Between Field Behaviours

5.4.0

  • Released 21 May 2018.

User interface rewrite

The administration user interface has been rewritten to provide a better and faster for enterprise-scale clients. The appearance is similar to the existing UI, but the rewrite gives us a base to add new features.

If you experience any problems please contact us through our Jira support desk.

Currently we are targeting this release only at Jira 7.9, over the next days we will make it available to earlier Jira versions.

Bug Fixes

  • [SRJIRA-2432] - Send custom email listener takes long time to load when user have thousands of groups.
  • [SRJIRA-2547] - Inline Edit Behaviours javascript is sending excessive requests to validators.json
  • [SRJIRA-2564] - Script fields break when the field has multiple configured contexts
  • [SRJIRA-2692] - Cannot Map JSD Behaviours to All projects and All Request Types
  • [SRJIRA-2773] - nextSprint JQL function only returns sprint if it is owned by the board provided as argument
  • [SRJIRA-2787] - Dependency Problems with parent pom
  • [SRJIRA-2792] - Script Registry workflow function link 404s for global transitions
  • [SRJIRA-2796] - Onboarding tooltips don't show up, leaving screens like the Script Console dark
  • [SRJIRA-2799] - Cannot highlight/select text if behaviour active on field
  • [SRJIRA-2812] - SR Behaviours failed to parse JSON
  • [SRJIRA-2795] - Jira 7.9.0 and Service Desk 3.12.0 Compatibility
  • [SRPLAT-263] - Copy button on code snippets in doc appears not to work anymore
  • [SRPLAT-184] - Disable configured items individually
  • [SRPLAT-7] - Document slow mode maven settings for script plugin developers
On this page