The Adaptavist Group LogoDocumentation

Event Listener Examples (In-app)

Browse in-app event listener scripts that sync fields, create subtasks, transition on assignment, add comments, and post new work items to Slack.

The following examples are available in-app via the Example scripts modal when you're creating an event listener. Each one describes when to trigger the script and why it's useful. See our examples page for suggested Jira expression filters to scope the execution of your event listeners.

Update fields when a work item is edited

Update one field when another field changes (for example, adjust priority when a Risk Level custom field is edited). Apply this script to the Issue Updated event. This is useful for keeping dependent fields in sync, such as updating a priority or custom status when a Risk Level field is edited.

Create subtasks for new work items

Create a set of predefined subtasks whenever a new work item is created. Apply this script to the Issue Created event and use the expression filter !event.issue.fields.issuetype.subtask to ensure it does not run for subtasks. This is useful for enforcing standard sub-tasks, such as Reproduce issue or Write test cases, whenever certain work items are created.

Transition work items when certain users are assigned

Perform a workflow transition when a work item is assigned to certain users (for example, transition to In Progress when the assignee is in the Developers project role). Apply this script to the Issue Assigned event. This helps keep workflow status aligned with ownership changes without requiring manual status updates.

Create a comment when a work item is created in a chosen space

Automatically add a comment to any newly created work item in a chosen space by handling the Jira issue-created event and running as the ScriptRunner app. This is useful for posting onboarding instructions, acceptance criteria templates, or links to documentation on every new work item.

Post new work items to Slack

Send a Slack notification via an incoming webhook whenever a new work item is created in a specific space, including links and key details such as summary, priority, and reporter. Apply this script to the Issue Created event. This is useful for keeping teams informed in real time about new bugs, requests, or tasks without requiring them to monitor Jira directly.

Search documentation

Start typing to search the docs.