The Adaptavist Group LogoDocumentation

Script Console Examples (In-app)

Browse the example scripts built into the script console for bulk updates, user and group management, escalations, and work item housekeeping.

The following example scripts are available in-app from the Example scripts modal in the script console. You can copy, paste, and customize any script, then save it for later use or configure it as a scheduled job to run automatically at specific times.

Create a work item

Create a new work item in a space, including required and custom fields. Use this to standardize how work items are created or to automatically generate template-based work items for common tasks, requests, or issues.

Why it's useful: Ensures consistent data entry and reduces manual effort when creating repetitive or structured work items.

Bulk create work items

Create multiple work items at once, setting fields such as summary, description, and custom fields for each work item.

Why it's useful: Ideal for initializing new projects, recurring release activities, or large-scale data imports where many similar work items need to be created consistently and efficiently.

Create a sub-task

Create a sub-task under an existing parent work item by specifying the parent key.

Why it's useful: Helps break large tasks into smaller, trackable pieces as part of a repeatable workflow, improving clarity and workload management.

Add users and groups to space roles

Add specific users and groups to space roles (for example, add a user to the Developers role and a group to the Administrators role in a given space).

Why it's useful: Speeds up onboarding and access management by automatically assigning the correct permissions to users and teams.

Copy values between custom fields

Copy values from one custom field to another on work items where the source field is populated and the target field is empty. Both fields must be the same type, as values are copied without transformation.

Why it's useful: Simplifies data cleanup and schema changes when you need to migrate or consolidate information between custom fields.

Copy versions to a new space

Copy all versions from one space to another, preserving each version's name, description, start date, and release date.

Why it's useful: Streamlines setup for new spaces that need to mirror an existing release or version structure, reducing configuration time and errors.

Bulk update work item resolutions

Update the resolution on all work items with a specific existing resolution (for example, change Duplicate to Won't Do across matching work items).

Why it's useful: Corrects large sets of work items that were given the wrong resolution, keeping reporting and metrics accurate.

Archive or unarchive work items

Archive or unarchive a set of specified work items by key, logging how many were updated in each operation.

Why it's useful: Helps you keep active boards and backlogs focused while still retaining historical records that can be restored when needed.

Count group members

Get the number of users in a specific group and return a message indicating the group's member count or that the group was not found.

Why it's useful: Supports access auditing, license monitoring, and validation that groups are correctly populated before assigning them to roles, permissions, or workflows.

Create a new user

Create a new user with a specified email address and product access (for example, Jira Software) by running the operation as the app.

Why it's useful: Automates user provisioning, reducing manual steps and ensuring new users receive the correct product access from day one.

List group members

Retrieve all users in a specific group and return their display names as a list.

Why it's useful: Makes it easy to review who has certain permissions or roles, or to communicate with all members of a group.

Remove users and groups from space roles

Remove specific users and groups from space roles (for example, remove a user from the Developers role and a group from the Administrators role in a given space).

Why it's useful: Supports secure offboarding and access reviews by quickly revoking permissions that are no longer needed.

List and search groups

Retrieve all group names in your instance and perform a filtered search for groups matching a specific query (for example, groups containing "jira").

Why it's useful: Helps you discover existing groups, avoid duplicates, and confirm the right group to use in automation, permissions, or role assignments.

Get the current user’s email

Get the current user’s email address regardless of their profile visibility settings by running the lookup as the app.

Why it’s useful: Useful for scripts that need a reliable email identifier, for example, for notifications, integrations, or user-specific processing, even when email visibility is restricted.

Escalate open work items

Transition open work items that have been waiting for more than 48 hours to a Needs Attention status and increase their priority by one level where possible.

Why it's useful: Prevents work from getting stuck by automatically surfacing items that have been idle for too long and raising their urgency.

Escalate high-priority work items

Transition high-priority work items that have not been updated recently using an Escalate workflow transition and add reminder comments tagging the assignee.

Why it's useful: Keeps critical items moving by prompting assignees and applying an explicit escalation path when progress stalls.

Remove inactive users

Remove users who are no longer active (for example, Atlassian accounts flagged as inactive) from your instance.

Why it's useful: Helps maintain a clean user directory, improve security, and manage license usage by removing accounts that should no longer have access.

Comment on overdue subtasks

Add reminder comments to unresolved subtasks that are past their due date, tagging the assignee to review the status or due date.

Why it's useful: Reduces the risk of missed deadlines by automatically nudging assignees when their subtasks fall behind schedule.

Close resolved work items

Transition work items from Resolved to Closed when they have been in the resolved status for at least 7 days.

Why it's useful: Automates workflow housekeeping, ensuring that long-resolved items are properly closed and do not clutter active queues or reports.

Archive completed work items

Archive work items that are in a completed status and have not been updated for at least 90 days.

Why it's useful: Keeps boards and backlogs focused on current work while safely retaining historical data for reference and compliance.

Search documentation

Start typing to search the docs.