For the complete documentation index, see llms.txt. This page is also available as Markdown.

Assign Jira Tickets to the Current Oncall

Fill the Jira assignee field with whoever is on call — via Jira Automation, the Jira REST API, or Pagerly's Slack integration.

Three ways to do this, in increasing order of control.

  1. Jira Automation — no code, runs inside Jira, covers every issue created in a project.

  2. Jira REST API — for tickets created by your own services.

  3. Pagerly's Slack integration — for tickets raised from a Slack thread or emoji reaction.

Prerequisites

The rule is two components: fetch the on-call accountId from Pagerly, then assign the issue to it.

Build the rule

  1. Create a new automation rule with the trigger you want — Work item created is the usual one. Narrow it with a condition if you only want it on bugs (Work item type equals Bug).

  2. Click Add component → Action → Send web request.

  3. Set Web request URL to:

    https://api.pagerly.io/pagerly/o/currentusersforjira?teamname=<teamname>

    Replace <teamname> with your Pagerly team's name.

  4. Set HTTP method to GET. Leave the body empty.

  5. Add a header:

    Header
    Value

    X-APIKEY

    Your Pagerly API key

  6. Tick "Delay execution of subsequent rule actions until we've received a response for this web request".

  1. Click Add component → Action → Assign work item.

  2. Choose Smart value as the assignment method.

  3. Under User, enter:

  4. Save and enable the rule.

What the endpoint returns

Pagerly resolves the current on-call user for the team, looks their email up in your connected Jira instance, and returns the Atlassian accountId — so the automation never has to do its own user search.

Handling nobody-on-call

If the schedule has a gap, there is no on-call user to resolve. Add a Condition between the two components:

and, on the else branch, assign to a fallback lead or add a comment tagging the team so the ticket does not disappear.

Reassigning at shift handover

The rule above assigns at creation. If you also want open tickets to follow the rota, add a second Scheduled rule that runs at your handover time with a JQL filter such as:

and the same two components. Label the tickets you want to travel; leave the rest with their owner.

Option 2 — Jira REST API

For tickets your own code creates. Two calls: ask Pagerly who is on call, then PUT the assignee.

A successful assignment returns 204 No Content.

If you would rather resolve the account yourself — for example because you want the on-call user's name and Slack ID for a comment too — use the generic endpoint and Jira's user search:

Option 3 — from Slack, via Pagerly

If the ticket is being raised out of a Slack conversation, Pagerly creates it already assigned.

The Slack thread and the Jira issue stay linked, so comments and status transitions flow both ways without anyone opening Jira.

Troubleshooting

Symptom
Cause
Fix

Issue created, assignee empty, no error

"Delay execution…" not ticked on the web request

Tick it and re-run

400 from the assign action

accountId was empty — nobody on call

Add the not-empty condition and a fallback

Rule assigns the wrong person

teamname points at a different Pagerly team

Check the name with GET /o/zapier/allteams

accountId returned but assign fails

User has no Jira licence, or no browse permission on the project

Grant access, or exclude them from the rota

Worked yesterday, fails today

Pagerly team was renamed

Update the URL; alert on non-200 responses

Last updated