5.3.1 addresses issues that arose in 5.3.0 with ScriptRunner and integrations with other Atlassian apps that modify the front-end infrastructure. This release should address these issues, and allow for seamless app compatibility.

We apologise for any inconvenience this might have caused, and thank the ScriptRunner community for their feedback and patience while we resolved this issue.

Bug fixes

Highlights from 5.3.0

Conditions and additional issue actions script file

You can now put your conditions and additional issue actions in a script file.

Breaking changes

When ScriptRunner is installed the old inline scripts will be converted to support the new schema. This only becomes a problem if you downgrade to a previous ScriptRunner release.

If you upgrade to 5.3.0+ you’ll not be able to downgrade to an earlier version of ScriptRunner. If you have concerns, you should test in a test/staging environment before installing in production.

Behaviours for Jira Service Desk

You can now apply behaviours to the customer portal. Things like help text, requiredness etc, follow the normal Service Desk theme.

We only support Service Desk from 3.5.2 onwards. Over the next few weeks we will add support for earlier versions.

Potentially breaking changes

Behaviours have been fixed so that when getting the value for a priority, it correctly returns a Priority object.

For example, so now you can correctly do:

getFieldById("priority").value?.name == "Highest"

If previously you were comparing the string value, for instance:

getFieldById("priority").value == "1"

you can either replace with code like the above, or change .value to .formValue.

Hide or disable tabs on Jira issue screens

You can now hide or disable entire tabs with Behaviours. You might wish to do this to prevent a category of field attributes being edited at certain stages of the workflow, or by certain groups or roles.

Set allowed options for radio and checkbox fields

You can now use setFieldOptions to restrict the available options for radio and checkbox custom fields, in exactly the same way as with select and multiselect fields.

Script Search within Script File Input

You now have the ability to search for scripts contained within your configured script roots inside ScriptRunner. Wherever you used to be able to paste the path of a script, you can now search for the script directly in the file input. Simply start typing the name of your script and the search will present suggestions that you can select!

Compatibility with JIRA 7.7 and Jira Service Desk 3.10.0

Compatibility with latest Jira release.

Potential XSS Issues Fixed

Insufficient escaping may have allowed a vulnerability via XSS. However we judge the severity of this vulnerability as "low" as it would require a specific sequence of actions by an administrator.

Fixed Bugs and Enhancements

Bug fixes

  • [SRJIRA-44] - behaviours: A read-only Version field can be emptied using delete key
  • [SRJIRA-77] - Required fields are not displayed when scrolling
  • [SRJIRA-643] - Field not consistently read-only with inline editing
  • [SRJIRA-689] - the Cascading select list first value equal to example wrong
  • [SRJIRA-791] - Behaviour didn't work for transistions (like in the past)
  • [SRJIRA-869] - Script Registry logs ERROR and Exception for validators
  • [SRJIRA-877] - Syntax check in Script Registry shows mangled script and errors
  • [SRJIRA-1325] - Adding a behaviour to the Due Date field does not disable inline editing
  • [SRJIRA-2142] - Behaviours ignores multi user picker custom field
  • [SRJIRA-2186] - LastComment function throws an error if there are no comments
  • [SRJIRA-2204] - Cannot use Behaviours on Original Estimate and other time tracking fields
  • [SRJIRA-2205] - JIRA comment behaviours broken in Issue View Screen
  • [SRJIRA-2212] - Behaviours sometimes don't work for full screen create/edit issue dialogs
  • [SRJIRA-2229] - Inconsistent setError in Behaviours
  • [SRJIRA-2257] - Escalation Service Throws an Exception
  • [SRJIRA-2320] - Setting Comment field to "required" via Behaviors results in an inconsistent red asterisk
  • [SRJIRA-2341] - Setting linked issues field as not required in behaviours does not unmark the field as required
  • [SRJIRA-2344] - Link does not create on issue for Confluence Pages
  • [SRJIRA-2345] - No red asterisks shown after enabling the Validator Plugin (JSU) in Behaviours on the Create issue screen
  • [SRJIRA-2354] - Behaviours set Description added multiple times
  • [SRJIRA-2355] - Behaviour on Component/s field result in an Uncaught TypeError when set to required and the project has no components
  • [SRJIRA-2396] - <script> tag causes the script registry to not load
  • [SRJIRA-2399] - Copy Project script fails to copy users and roles
  • [SRJIRA-2416] - Behaviours do not return the value of the Sprint field as expected
  • [SRJIRA-2423] - Behaviour Mapping Setup shows duplicate Sub-task issue types
  • [SRJIRA-2447] - Setting up a Dev Environment instructions don't work for latest SR Version
  • [SRJIRA-2452] - On transition screens fix version/s red asterisk persists when set to not required via Behaviour
  • [SRJIRA-2456] - Behaviours: Setting the Assignee field as required does not work
  • [SRJIRA-2531] - Links are broken in Script Information dialog
  • [SRJIRA-2540] - IE11issues caused by use of includes
  • [SRJIRA-2544] - In FieldBehaviours class there is typo which throws exception.
  • [SRJIRA-2559] - Fix location and structure of help text
  • [SRJIRA-2569] - ProjectRole* events are not listed in Script Listener Event list
  • [SRJIRA-2577] - If a behaviour is configured - Script registry fails
  • [SRJIRA-2581] - Test Runner Removes Configured Scripted Fields and Listeners
  • [SRJIRA-2583] - behaviours editing GUI rewrite
  • [SRJIRA-2584] - codemirror linting broken
  • [SRJIRA-2585] - builds infrastructure improvements
  • [SRJIRA-2597] - can't have a behaviour on issue type anymore
  • [SRJIRA-2605] - behaviours documentation is wrong due to .getValue change
  • [SRJIRA-1319] - Add current http request to behaviours script bindings
  • [SRJIRA-1385] - Ability to hide/show entire tabs
  • [SRJIRA-2207] - Add an expandable example showing how to change the default FROM email address
  • [SRJIRA-2258] - hasRemoteLinks JQL function
  • [SRJIRA-2353] - Lock the issueFunction custom field
  • [SRJIRA-2387] - Behaviours: Extend use of the setFieldOptions function to other field types
  • [SRJIRA-2546] - Implement helping pop-up for JSD Fragments
  • [SRJIRA-2557] - Ability to set change the name of the field via Behaviours
  • [SRJIRA-2315] - Implement Web Fragments for JSD
  • [SRJIRA-2319] - As an Administrator, I need the Send Customer Email script to automatically send emails to Approvers and members of Organizations to keep everyone informed of activities in ServiceDesk
  • [SRJIRA-2402] - As a JIRA Administrator, I need to be able to load Conditions and Validators from source files so my whole ScritpRunner customization can be code reviewed and deployed to a file system
  • [SRJIRA-2429] - Provide an interface for selecting which script file to apply to any given automation, rather than writing out the file by name
  • [SRJIRA-2103] - Behaviours API does not expose getConfigsFor()
  • [SRJIRA-2382] - Midori Better Excel Docs Example
  • [SRJIRA-2519] - User Guide - Scripted Fields and Displaying links
  • [SRJIRA-2596] - Update Build Plan to include 7.7
  • [SRJIRA-2598] - Compatibility with Jira 7.7.0 & SD 3.10.0
  • [SRPLAT-249] - Built In Scripts Not Ordered and naming inconsistency
  • [SRPLAT-127] - Separate log file for ScriptRunner logging