The Adaptavist Group LogoDocumentation

Workflow Action Examples (In-app)

Browse in-app workflow action scripts that create subtasks, notify teams, assign work, set fields, comment, manage sprints, and clone or archive work items.

The following examples are available in-app via Example scripts when you're configuring Workflow actions. You can copy these scripts, adapt the logic to your own workflows, and attach the workflow actions to the relevant transitions in your workflow.

Create a subtask when a work item is transitioned

Automatically create a subtask (for example, Analysis) when a non‑subtask work item moves through a workflow transition.

Why it's useful: Ensures that standard follow‑up steps are always captured at specific stages (such as analysis, QA, or deployment tasks), reducing the chance that important work is forgotten and helping you enforce a consistent process across teams.

Transition the parent when all subtasks are resolved

Automatically transition a parent work item (for example, using the Resolve Work Item transition) once all of its subtasks are resolved.

Why it's useful: Keeps parent items in sync with the actual state of their subtasks, removing the need for manual status updates. This improves reporting accuracy (for example, epic or feature completion) and makes boards and dashboards reflect real progress.

Assign to role members

Set the assignee of a work item to a user from a specified role (for example, assign to the last user in the Developers role for the current space) when this workflow action runs.

Why it's useful: Automates handoffs between roles at key workflow steps, such as from Triage to Developers, or from Testing to Release Managers, so work items move smoothly to the right person or team without manual reassignment.

Assign to the first member of a role

Assign the work item to the first member of a role, sorted by display name, when this workflow action runs. Members added to the role through a group are included. You name the role in the settings at the top of the script.

Why it's useful: Gives every work item reaching a stage a predictable owner, such as a team lead, without a manual assignment step.

Add the current user as a watcher

Add the person who made the transition as a watcher of the work item when this workflow action runs. If the transition wasn't made by a person, for example by an automation rule, nobody is added.

Why it's useful: Keeps whoever moves a work item informed about what happens to it next, without them having to remember to watch it. Useful for approvers and anyone handing work over.

Add a comment

Add a comment when this workflow action runs, naming who made the transition and when. You set these parameters when you add the workflow action to a transition, so one script serves every transition:

  • Comment: the wording, in Markdown. {user} is the person who made the transition and {now} is the time.
  • Date format: how the time is written.
  • Time zone: the time zone for the time, for example Europe/London.
  • Internal comment: on a service space, post the comment internally so customers can't see it.

Why it's useful: Leaves a record on the work item itself, so anyone reading it later can see who moved it and when without opening the history. Useful for approvals and handovers that need to be visible to the whole team.

Comment on linked work items

Add a comment to every work item linked to this one when this workflow action runs. You set the comment and, optionally, a single link type to limit it to (for example, Blocks) in the settings at the top of the script. A work item that's linked more than once gets one comment.

Why it's useful: Tells the people working on related items that something they depend on has moved, such as a blocker being resolved, without anyone posting updates by hand.

Clear fields

Clear one or more fields when this workflow action runs. You list the fields in the Fields to clear parameter when you add the workflow action to a transition, so one script serves every transition. List fields such as labels and components are emptied, and every other field is unset.

Why it's useful: Removes values that shouldn't carry over to the next stage, such as an approver or a due date when work is sent back for rework, so nobody is misled later by a value that no longer applies.

Copy a field value

Copy one field into another on the same work item when this workflow action runs. You name the fields in the Copy from and Copy to parameters when you add the workflow action to a transition, so one script serves every transition. The two fields should be the same type.

Why it's useful: Keeps a second field in step with the first without anyone retyping it, such as capturing who the reporter was at the point of a transition so later changes don't overwrite the record.

Set the security level

Set the work item's security level when this workflow action runs, optionally only for work items with a specific priority. You name the security level and priority in the settings at the top of the script. The security level must be in the space's work item security scheme.

Why it's useful: Restricts who can see sensitive work at the right moment, such as making a security bug private as soon as it's triaged.

Send a Slack notification

Send a Slack notification via an incoming webhook whenever this workflow action runs, including the work item key, new status, summary, triggering user, and a link back to Jira.

Why it's useful: Keeps teams informed about important workflow transitions (such as moving to Ready for QA or Blocked) directly in Slack, so they can react quickly without constantly checking Jira. This is especially helpful for distributed teams or time-sensitive work.

Send a notification

Have Jira email the reporter, assignee, watchers, or members of groups you name when this workflow action runs. You set the subject, message, and recipients in the settings at the top of the script.

Note: Jira only emails people who can see the work item. It can't email external addresses.

Why it's useful: Lets the right people know about a transition by email, such as telling the reporter that their request is ready for review.

Fast-track transition

Move the work item straight on through another transition when it matches a condition (for example, when its priority is Highest). You name the transition and the priority in the settings at the top of the script. The transition must be available from the work item's new status.

Why it's useful: Skips steps that don't apply to urgent work, such as sending top-priority work straight to escalation, so it reaches the right people faster.

Add to or remove from the active sprint

Add the work item to the active sprint of a board when this workflow action runs, or remove it from its sprint and return it to the backlog. You name the board and choose whether to add or remove in the settings at the top of the script. If the board has no active sprint, the work item isn't added.

Why it's useful: Pulls work into the current sprint when it's ready, such as when it's approved, or moves it out when it's put on hold, so boards stay accurate without manual sprint planning.

Archive the work item

Archive the work item when this workflow action runs, optionally only when it has a specific resolution (for example, Won't Do). You set the resolution in the settings at the top of the script.

Note: Archiving needs a Jira Premium or Enterprise plan. An archived work item is read-only and doesn't appear in search results until it's restored.

Why it's useful: Clears closed work that nobody needs to see again out of searches and boards, while keeping the record in case you need to restore it.

Search documentation

Start typing to search the docs.