Release 8.x
Check out what's new for ScriptRunner for Confluence!
8.14.0
Upcoming feature removal
In the next release, the Currency Converter macro will be removed. This macro has not been functional for quite some time due to the change in the Exchange Rates API becoming a paid-only service. See SRCONF-2879 - Getting issue details... STATUS for more information.
Bugs fixed
8.13.0
Script Plugins Update
Script plugins can now be created for Custom Search Fields.
Documentation updates
A Licensing FAQ was added.
Bugs fixed
8.12.0
There are only core component changes in ScriptRunner for Confluence 8.12.0, so we do not have any new features or bug fixes to report.
Documentation updates
- Delete a REST Endpoint That Broke the REST Endpoint Page was added to help you troubleshoot REST endpoints.
- Create a Confluence Toolbar Dropdown Option was added to document a workaround for adding a web section if they do not work in your instance.
8.11.0
There are only core component changes in ScriptRunner for Confluence 8.11.0, so we do not have any new features or bug fixes to report.
8.10.0
CQL autocomplete updates
CQL autocomplete was added to the CQL fields on the following scripts:
Confluence administration built-in scripts
Space administration built-in scripts
Jobs
Bugs fixed
8.9.0
CQL autocomplete updates
CQL autocomplete was added to Add/Remove Watchers built-in script and Add/Remove Watchers listener.
User interface update to Listeners, Jobs, and Fragments
The Note field has been updated to Name for Listeners, Jobs, and Fragments. We have also made the Name field more prominent on the main pages for Listeners, Jobs, and Fragments, so you can easily identify your configurations.
Documentation updates
- Scripting Resources was added to gather resources for coding help.
New features
8.8.0
Script plugins update
We've done some work on the infrastructure supporting script plugins. As part of this, resources and macros can now be exported and worked on in a script plugin. We are aiming to get closer to feature completion in the coming months.
Dynamic forms update
You can use optionsGenerator
within the select list annotation to customize your own list options. This is useful if you can't find a dynamic form annotation that is suitable for your purpose.
Built-in script update
The Convert Absolute Links to Confluence Links built-in script has been updated. If an absolute URL points to any version of the page other than the current version, it won’t be converted to a Confluence link because it will not work.
Bugs fixed
8.7.1
Confluence compatibility
ScriptRunner for Confluence is now compatible with Confluence 8.4.0.
8.7.0
Bugs fixed
8.6.0
New features
Bugs fixed
8.5.0
Bugs fixed
8.4.0
Documentation updates
We've identified another breaking change in Groovy 4 that can impact those who use the @Grab
annotation to import certain external libraries. The Groovy 4 Breaking Change for Grab Annotations page has more information on this breaking change and solutions on how to fix it.
Visit the new Vulnerabilities and Security page to learn about how we scan for vulnerabilities and common security concerns.
A Dynamic Forms page was added to the ScriptRunner for Confluence documentation to help you simplify the process of adding variables to your ScriptRunner Groovy scripts.
Bugs fixed
8.3.0
CQL autocomplete
ScriptRunner for Confluence now features autocomplete for CQL! This feature will dynamically show query options when you type a CQL query in Enhanced Search.
Check out the CQL Guide and the Enhanced Search documentation to learn more.
New features
Bugs fixed
8.2.1
Bugs fixed
8.2.0
Bugs fixed
8.1.0
Bugs fixed
8.0.0
Groovy 4 update
We have updated ScriptRunner for Confluence Server/Data Center to Groovy 4!
Our primary motivator for this update is to provide support for JDK 17. Groovy 3 doesn't support JDK 17, and with Jira 9.5.0 and Confluence 8.0 being JDK 17 compatible, an upgrade to Groovy 4 is necessary.
So, apart from JDK 17 compatibility, what comes with this update, and how will it benefit you?
New features in Groovy 4
The following are the most significant new features that have been added in Groovy 4 :
- Switch expressions which, unlike switch statements, are optimized towards branches that handle one case and break out rather than fall through to the next case.
- Sealed types
- Records
- Ranges have been enhanced with support for ranges open on the left, for example,
3<..5
, or both sides, for example,0<..<3
- Support for annotating generic types, for example
List<@IntRange(min = 0, max = 10) Integer>
Please have a look at the Groovy 4 Release Notes for a complete list of new features.
Breaking changes in Groovy 4
Groovy 4 contains a number of breaking changes. The ones which are the most significant and likely to affect ScriptRunner users are listed below. Please have a look at the Groovy 4 Release Notes for a complete list of breaking changes.
1) Legacy package removal
Groovy 3 provided duplicate versions of numerous classes (in old and new packages) to allow Groovy users to migrate towards the new JPMS-compliant package names - see the section about it in Groovy 3 Release Notes for more details. Groovy 4 no longer provides duplicate legacy classes.
For backwards compatibility reasons ScriptRunner still ships with the deprecated version of groovy.util.XmlSlurper
and groovy.xml.XmlParser
. We recommend you don't use these legacy classes going forward and use their equivalents that can be found in groovy.xml
package.
2) Changes related to how Groovy code accesses private fields from within closures
Groovy developers are currently attempting to improve how its code accesses private fields in certain scenarios where such access is expected but problematic. For example, within closure definitions where subclasses or inner classes are involved (GROOVY-5438). You may notice breakages in Groovy 4 code in such scenarios until they fix this issue.
3) Change to intersect
() default Groovy method
intersect()
default Groovy method used to draw elements from the second argument passed to it, but now it draws elements from the first argument passed to it - see GROOVY-10275.
4) Error message for users using @Grab
to import certain libraries
There has been a breaking change for users using @Grab
to import certain libraries. Check out the Groovy 4 Breaking Change for Grab Annotations page for more information on this breaking change and solutions on how to fix it.
5) Changes to the resolution of properties with both a getter and isser returning different typesThis Breaking Change will mostly affect Jira API users, but it could affect uncommon parts of the Confluence API. We do not expect this issue to be widespread when using ScriptRunner for Confluence. We've included information about a common example in the Jira API that you could use to solve issues you uncover when working with uncommon parts of the Confluence API. An isser is a method to retrieve boolean properties. Instead of the method name starting with For properties that have a getter and an isser returning different types (for example, JiraAuthenticationContext#getLoggedInUser and JiraAuthenticationContext#isLoggedInUser) when accessing the property, instead of calling one of the methods (for example, Solution From Groovy 4 if you have custom classes, or are using external classes that implement conflicting isser and getter methods, and you are using the property syntax to get the getter value, you must re-write the logic to use the getter method directly. For example, this class demonstrates conflicting isser and getter methods:
From Groovy 4, this should be written as:
For backward compatibility reasons, ScriptRunner ships with a patch to keep the old Groovy 3 behaviour for two conflicting Jira API properties commonly used in customer scripts:
We've included this patch as these properties will likely be heavily used in users' scripts. This means you do not need to change any code using these properties |
Important notice for Java 17 users
There is a current omission in the Confluence archive that may cause compatibility issues with Java 17. You need to manually add the following JVM flag to avoid these issues:
groovy--add-opens=java.base/java.lang.reflect=ALL-UNNAMED
See Atlassian’s knowledge base guide on configuring system properties for information on how to configure system properties and therefore add the JVM flag.
These flags are required to address module encapsulation introduced in Java 9 and later, which can cause issues when using reflection or accessing certain internal APIs. We are working closely with Atlassian to address this issue in future releases.
Deprecated SrSpecification class removed
Authors of script plugins may be used to writing tests which extend the deprecated com.onresolve.scriptrunner.canned.common.admin.SrSpecification
class. This class has been removed. Authors of tests for their scripts should extend the spock.lang.Specification
class directly. Tests should still be picked up by Test Runner built-in script as normal.
New features