# How Do I Get a Jira Time in Status Report? A Delivery Reporting App Builds One From Each Customer's Jira Every Week

A delivery reporting app for software agencies makes one agent per customer that reads each Jira issue's status history and reports where work waits.

[Run this on Rush](https://cloud.getrush.ai/run/report-time-in-status/atlassian/). Opens the console with this prompt ready to send. Connect Atlassian there first.

## What the agent does

This is for a SaaS company that sells delivery reporting to software agencies and the engineering managers inside them. Its customers run client work in Jira Software, and the question they ask most is where work waits: how many days a ticket spends in Code Review or Ready for QA before anyone picks it up, and which tickets are sitting there now. Teams that want that as a table per issue usually buy a Marketplace app or export each issue's history to a spreadsheet. The company adds a weekly time in status report to its product, read from each customer's own Jira through the Atlassian Rovo MCP server.

The company connects Atlassian once for itself and saves the agent as a template with `POST /o/{org}/agents`, naming its `atlassian` connection, a sign-in to `https://mcp.atlassian.com/v2/mcp`. When a customer turns the report on, the backend calls `POST /o/{org}/agents {"template": "<template id>", "name": "time-in-status-<customer id>"}`, stores the agent id, calls `POST /o/{org}/agents/{agent}/connections {"type": "mcp", "name": "atlassian"}` and opens the `authorize_url` in a popup while the customer's admin is signed in to the app. Atlassian's docs say the server signs in with OAuth 2.1 and respects the person's existing Jira permissions, so the report covers the projects that person can see, and the company registers no Atlassian app of its own.

On a run the agent calls `atlassianUserInfo` to record whose view it reads, then `getAccessibleAtlassianResources` for the site's `cloudId`, which Atlassian's tool list says every other call needs, and `getJiraBoardConfig` for the board in the input, which gives its columns and the statuses mapped to each. It runs `searchJiraIssuesUsingJql` for the issues resolved in the last seven days and the issues still open on that board. The status history is not a primary tool: the agent finds `listJiraIssueChangelogs` with `discover` and calls it through `executeRead` for each issue, reading the history oldest first and keeping the entries where the status field changed, with their times.

From those entries it adds up how long each issue spent in each status, in calendar hours, from the issue's creation to its resolution or to the time of the run. It groups statuses by board column, so a team with Code Review and Peer Review in one column reads one number. For the week it reports, per column, the median and the slowest tenth of resolved issues, and the open issues that have been in a waiting column (Code Review, Ready for QA, Blocked, as the input names them) longer than the threshold, longest first, with assignee and last status change. An issue reopened after resolution is counted once per pass and marked, because averaging it in hides the rework.

## Start it with one API call

`POST https://api.phoenix.so/o/{org}/sessions`

```json
{
  "agent": "<agent id>",
  "input": "Weekly time in status report. Read only: use only primary read tools and executeRead; never call executeWrite or executeDestructive, never transition, comment on, assign or edit an issue. Site: acme-agency.atlassian.net. Board: 'Client Portal' (board id 42). Week: 2026-11-16 to 2026-11-22, time zone America/New_York. Waiting columns: Code Review, Ready for QA, Blocked; threshold 3 days. 1) atlassianUserInfo, record whose view you read; getAccessibleAtlassianResources, record the cloudId for the site. 2) getJiraBoardConfig for board 42: columns and the statuses in each. 3) searchJiraIssuesUsingJql with the board's filter plus 'resolved >= \"2026-11-16\" AND resolved < \"2026-11-23\"', then with the board's filter plus 'statusCategory != Done'. 4) For each issue, discover listJiraIssueChangelogs and call it with executeRead; follow every page; keep status changes with their timestamps. 5) Compute calendar hours per status from created to resolution or to now; map statuses to columns. Mark issues reopened after resolution. Write time-in-status.md: per column for resolved issues, count, median and 90th percentile days; a table of resolved issues with days per column; open issues in a waiting column longer than the threshold, longest first, with key, summary, assignee, column, days in it and last change. Return the same as JSON: {read_as, cloud_id, board, week, columns: [{name, statuses, resolved_count, median_days, p90_days}], resolved: [{key, summary, days_by_column, reopened}], waiting: [{key, summary, assignee, column, days, since}]}. If a tool is unavailable because an admin turned off its permission group, stop and report Atlassian's message."
}
```

1. **Get an API key.** In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
2. **Send the request.** POST the body in request.json to https://api.phoenix.so/o/{org}/sessions. The run starts in its own cloud sandbox.
3. **Read what came back.** Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.

## What comes back

What comes back is the JSON in the session's `result`, which the `run.completed` webhook carries to the company's server, and `time-in-status.md` among the session's files. The app draws its own chart from the JSON: days per column for last week's resolved issues and a list of open issues that have waited past the customer's threshold, each linking to the Jira issue by key.

What the engineering manager checks before acting on it: that the board's columns still match how the team works, since a status added last month and never mapped to a column shows up on its own; and that a long wait is real. An issue that sat in Blocked over a public holiday reads the same in calendar hours as one nobody picked up. Asking the reviewer, splitting the ticket or changing the workflow are the team's decisions. The agent only reads Jira, and the report says which account it read as, so a project that person cannot see is visibly missing rather than silently left out.

## Run it on every Monday morning

The app's scheduler sends `POST /o/{org}/sessions` with `{"agent": "<agent id>", "input": "…"}` for each customer early on Monday in that customer's time zone, writing the board, the week and the customer's waiting columns into the input, with a fresh `request_id`, a UUID, per customer and week so a retried call starts no second run.

A customer can also ask for the report on demand from the app, for a release or a client's quarterly review, with a longer window. That is another run of the same agent, and runs for many customers go at the same time up to the API key's concurrency limit, each in its own computer, with the rest queued until a slot frees.

## Why run it on Rush?

Each customer's Atlassian sign-in is held in Rush's connection under that customer's own agent, so the reporting company never handles an Atlassian token, and a run for one agency cannot reach another agency's Jira. Deleting a customer's agent when they cancel disconnects their sign-in. Each session's `accounts` names the Atlassian connection it used, which is the record a customer's security review asks for.

Time in status is arithmetic over a changelog, but getting the changelog right is the hard part: paging through every issue's history, mapping statuses that teams rename to the board's columns, and handling issues that bounce between Code Review and In Progress four times. Each run has its own computer and a record of every tool call, so when a customer asks why an issue shows nine days in Ready for QA, support opens that week's session. Each customer's sessions, listed with `GET /o/{org}/sessions?agent=<agent id>`, add up to what their reports' model calls cost.

## Frequently asked questions

### Why calendar hours rather than working hours?

Calendar time is what the changelog records and what a client waits. Working hours depend on each team's schedule and holidays, which the agent does not know. A customer who wants working days can put their working week and holidays in the input, and the agent subtracts the rest.

### Does it need Jira admin rights?

No. Atlassian's docs say the MCP server acts with the signed-in person's existing permissions, and reading issues, boards and changelogs needs only permission to browse those projects. An organization admin can turn permission groups off, and the prompt tells the agent to stop and report Atlassian's message if a read tool is unavailable.

### How is this different from a Marketplace time in status app?

A Marketplace app runs inside Jira for the customer who installs it. This is a report inside the reporting company's own product, built from the customer's Jira on the customer's sign-in, combined with whatever else the product shows. Both read the same status history.

### What about Jira Service Management requests?

The same changelog exists for service requests. Point the input at a service project's queue instead of a software board and name the statuses that mean waiting on the customer, so the report separates time the team held a request from time the customer did.

## More Atlassian jobs

- [Write a Jira Sprint Report](https://getrush.ai/run/sprint-report/atlassian/)
- [Sprint Velocity Report From Jira for Each Client](https://getrush.ai/run/sprint-velocity-report-for-each-client/atlassian/)
- [Triage a Stale Jira Backlog](https://getrush.ai/run/backlog-triage/atlassian/)

## More jobs like this: Run an agent per customer task

- [Repurpose Podcast Content Into Buffer Drafts](https://getrush.ai/run/repurpose-each-podcast-episode-into-social-posts/buffer/)
- [How Do I Automate Sales Prospect Research per Lead?](https://getrush.ai/run/research-each-new-sales-lead/gmail/)
- [Which Queries Got Slower This Month? A Database Consultancy's PlanetScale Review for Each Client](https://getrush.ai/run/review-each-clients-slow-queries/planetscale/)

## Keep reading

- [Connect Atlassian to Rush once, then name it on any run](https://getrush.ai/integrations/atlassian/)
- [Start your first run from the developer API quickstart](https://getrush.ai/docs/quickstart/)
- [Rush pricing: Free, Pro and Max](https://getrush.ai/pricing/)
