This repository provides sample ScriptRunner plugins for Atlassian products (Jira, Confluence, and Bitbucket). These samples demonstrate how to create custom scripts that extend Atlassian product functionality using Groovy.
├── jira/ - Jira ScriptRunner samples (Event Listeners, REST endpoints)
├── confluence/ - Confluence ScriptRunner samples (CQL functions, Search fields, REST endpoints)
└── bitbucket/ - Bitbucket ScriptRunner samples (Pre-receive hooks, REST endpoints)
Before you start, you'll need:
- Atlassian SDK - Install following the Atlassian SDK documentation
- Java 17 - Required for Jira 10.3+ (Java 8 and 11 are not supported)
- Maven (comes with the Atlassian SDK)
Build all modules:
atlas-mvn clean installBuild a specific product module:
cd jira
atlas-mvn clean installStart Jira with the plugin installed:
cd jira
atlas-mvn jira:debug -UStart Confluence with the plugin installed:
cd confluence
atlas-mvn confluence:debug -UThe Atlassian product will start on http://localhost:2990/jira or http://localhost:1990/confluence with default credentials admin/admin.
Note: Bitbucket requires additional git server/sidecar setup to run locally.
Run integration tests for a module:
cd jira
atlas-mvn integration-testRun a specific test:
cd jira
atlas-mvn integration-test -Dit.test=CustomEventListenerITEach module contains example scripts demonstrating common ScriptRunner patterns:
- Event Listeners - React to product events (project creation, page updates, etc.)
- REST Endpoints - Create custom REST APIs
- Hooks (Bitbucket) - Validate commits before acceptance
- CQL Functions (Confluence) - Extend Confluence Query Language
- Search Fields (Confluence) - Add custom searchable fields
For more details see:
This repository is configured to use version 89 of the scriptrunner-*-standard parent POMs, which is known to work with the Adaptavist Nexus repository at https://nexus.adaptavist.net.
If you encounter issues:
- Master branch uses version 90, which may have dependency resolution problems
- The
bugfix/listener-registrationbranch uses version 34 withhttps://nexus.adaptavist.com(different URL) - Several experimental branches exist with alternative configurations
The repository contains several branches with alternative approaches:
bugfix/listener-registration- Simplified setup with older, stable versions (parent POM 34, Jira 8.13, Confluence 7.13, Bitbucket 7.17)feature/test-service-implementation- Jira 11 compatibility using JAR packaging instead of atlassian-plugintask/platform-7-compatibility- Platform 7 specific updates
These branches may provide working reference implementations if you encounter issues with the current setup.