Jira Stale Issue and SLA Escalation
On a schedule, the flow finds Jira issues that are idle past a threshold, breaching an SLA, or stuck in a status too long, nudges the assignee, escalates to the lead, and flags or transitions the issue. Keeps the backlog healthy and prevents stuck work.
Provided as-is, without warranty of any kind. Review and test each pattern in a non-production environment before deploying it to live automations. See our Terms.
Overview
This flow keeps a Jira backlog healthy. On a daily schedule it searches Jira (via JQL) for unresolved issues that have gone idle past a configurable threshold, then for each one it nudges the assignee with a comment on the issue, escalates to the team's Microsoft Teams channel, and emails a consolidated digest to the lead. Every escalation carries a single correlation id so one sweep can be traced end-to-end across Jira, Teams, and Outlook.
Why it matters: issues silently rot in the backlog. A proactive aging/SLA pass keeps work moving and surfaces neglected items before they breach SLA.
Ships Off (Stopped).
Use Case
A delivery team (project managers and developers) wants automatic detection and escalation of stale or SLA-breaching Jira issues, without anyone manually combing the backlog. The flow runs every morning, flags everything idle past the threshold, and makes the neglect visible to both the assignee (on the issue) and the lead (by email + Teams).
Flow Architecture
Daily 08:00 SLA Sweep
RecurrenceDaily aging sweep at 08:00 Eastern.
Initialize Trace & Config
Initialize variableMints a correlation id and binds the idle threshold, status SLA map, Jira instance, lead email, and Teams ids; seeds the stale counter and HTML row accumulator.
Compose Stale JQL
ComposeBuilds updated <= -Nd AND statusCategory != Done ORDER BY updated ASC from the idle days.
Search Stale Issues
Jira - ListIssuesJQL search returning idle/unresolved issues.
For Each Stale Issue
Apply to each (concurrency 1)Computes idle hours, posts a nudge comment on the issue (AddComment), escalates to the Teams channel, and appends a digest row.
Email the Lead if Any Stale
Condition + Outlook SendEmailV2Only when something was found, emails the consolidated HTML digest to the lead (High importance).
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_IdleDays | String | 5 | Days without update before an issue is stale. |
| flowlibs_StatusSlaMap | String | {"In Progress":7,"In Review":3,"Blocked":2} | Status to max-days map for per-status SLA customization. |
| flowlibs_JiraInstance | String | REPLACE_WITH_JIRA_INSTANCE | Jira instance id passed as X-Request-Jirainstance. |
| flowlibs_TeamsGroupId | String | <your-team-id> | Teams team (group) id for escalations. |
| flowlibs_TeamsChannelId | String | <your-channel-id> | Teams channel id for escalations. |
| flowlibs_LeadEmail | String | lead@contoso.com | Mailbox that receives the digest. |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Jira | shared_jira | ListIssues AddComment |
| Microsoft Teams | shared_teams | PostMessageToConversation |
| Office 365 Outlook | shared_office365 | SendEmailV2 |
Note — All connections are referenced as solution connection references; the flow is portable between environments as long as a connection is mapped at import time.
Customization Guide
Almost every realistic variant of this flow can be implemented by changing environment variable values. A few cases require small edits inside the flow definition — those are called out explicitly below.
- Idle threshold
- Change flowlibs_IdleDays (3, 7, 14); the JQL rebuilds automatically.
- Per-status SLA
- flowlibs_StatusSlaMap holds a status-to-max-days map; extend the loop to flag specific columns (e.g. Blocked > 2 days).
- Auto-transition
- Add a Jira UpdateTransition in the loop to move very stale issues to a triage status.
- Throttle nudges
- Track already-nudged issues (e.g. a Dataverse log keyed by issue + date) so the same issue is not commented every day.
- Schedule
- Adjust the daily sweep recurrence frequency/time/timezone.
Key Expressions
The flow is intentionally light on Power Fx / WDL gymnastics — the heaviest expressions are the branch-name concatenation and the approval outcome check. They are listed below in the order they appear in the flow.
EXPR.01Stale JQL
Builds the aging JQL from the idle days.
EXPR.02Idle hours
Hours since the issue was last updated.
EXPR.03Search output path
The stale issues to process.
EXPR.04Correlation id
Stamped on every comment, Teams post, and the email.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.