Jira Automation
Incidents - Status
⚙ Technical Requirements
Jira Cloud with Automation for Jira enabled
Project Admin permission to import automation rules
Import via: Project Settings → Automation → Import rule
Jira Automation — 6 rules
a4j-rule-001
Auto-close stale 'Completed' Incidents
Automatically transitions incidents from 'Completed' to 'Closed' after 5 days of inactivity. This addresses the average 7-day delay observed in the data for the 'Completed -> Closed' transition.
Trigger
scheduled jql
Actions
·transition issue
·add comment
Script Jira Automation JSON
{
  "name": "Auto-close stale 'Completed' Incidents",
  "state": "ENABLED",
  "canOtherRuleTriggerThis": false,
  "shareTeam": false,
  "tags": [],
  "ruleScope": {
    "resources": [
      "ari:cloud:jira::site/SITE-ID"
    ]
  },
  "trigger": {
    "component": "TRIGGER",
    "type": "jira.jql.scheduled",
    "value": {
      "cron": "0 0 9 ? * MON-FRI *",
      "jql": "status = Completed AND updated <= -5d AND issuetype = 'Work Type = Incident'"
    }
  },
  "components": [
    {
      "component": "ACTION",
      "type": "jira.issue.transition",
      "value": {
        "transition": {
          "name": "Completed - Closed"
        }
      }
    },
    {
      "component": "ACTION",
      "type": "jira.comment.add",
      "value": {
        "comment": "This incident has been automatically closed after 5 days in the 'Completed' status due to inactivity."
      }
    }
  ]
}
a4j-rule-002
Nudge stale 'Pending' Incidents
Adds a reminder comment to incidents that have been in 'Pending' for 3 days. This is based on the evidence that tickets wait in 'Pending' for an average of 47 hours (~2 days) before being actioned.
Trigger
scheduled jql
Actions
·add comment
Script Jira Automation JSON
{
  "name": "Nudge stale 'Pending' Incidents",
  "state": "ENABLED",
  "canOtherRuleTriggerThis": false,
  "shareTeam": false,
  "tags": [],
  "ruleScope": {
    "resources": [
      "ari:cloud:jira::site/SITE-ID"
    ]
  },
  "trigger": {
    "component": "TRIGGER",
    "type": "jira.jql.scheduled",
    "value": {
      "cron": "0 0 9 ? * MON-FRI *",
      "jql": "status = Pending AND updated <= -3d AND issuetype = 'Work Type = Incident'"
    }
  },
  "components": [
    {
      "component": "ACTION",
      "type": "jira.comment.add",
      "value": {
        "comment": "This incident is currently in 'Pending' and awaiting a response. Please provide an update. Note: This ticket will be automatically closed if there is no update within the next 4 days."
      }
    }
  ]
}
a4j-rule-003
Auto-close 'Pending' Incidents after 7 days
Automatically closes incidents that have been in 'Pending' for 7 days due to no response, setting the 'Close Code' to 'No feedback from user', which is an existing close code.
Trigger
scheduled jql
Actions
·edit field
·transition issue
Script Jira Automation JSON
{
  "name": "Auto-close 'Pending' Incidents after 7 days",
  "state": "ENABLED",
  "canOtherRuleTriggerThis": false,
  "shareTeam": false,
  "tags": [],
  "ruleScope": {
    "resources": [
      "ari:cloud:jira::site/SITE-ID"
    ]
  },
  "trigger": {
    "component": "TRIGGER",
    "type": "jira.jql.scheduled",
    "value": {
      "cron": "0 0 9 ? * MON-FRI *",
      "jql": "status = Pending AND updated <= -7d AND issuetype = 'Work Type = Incident'"
    }
  },
  "components": [
    {
      "component": "ACTION",
      "type": "jira.issue.field.edit",
      "value": {
        "fields": {
          "Close Code": {
            "value": "No feedback from user"
          }
        }
      }
    },
    {
      "component": "ACTION",
      "type": "jira.issue.transition",
      "value": {
        "transition": {
          "name": "Close"
        }
      }
    }
  ]
}
a4j-rule-004
Flag Rework when Incident is Reopened
Adds a comment when an incident is transitioned from 'Completed' back to 'Work in Progress'. This transition is a clear rework signal, occurring in 2.7% of cases.
Trigger
issue transitioned
Actions
·add comment
Script Jira Automation JSON
{
  "name": "Flag Rework when Incident is Reopened",
  "state": "ENABLED",
  "canOtherRuleTriggerThis": false,
  "shareTeam": false,
  "tags": [],
  "ruleScope": {
    "resources": [
      "ari:cloud:jira::site/SITE-ID"
    ]
  },
  "trigger": {
    "component": "TRIGGER",
    "type": "jira.issue.transitioned",
    "value": {
      "from": [
        {
          "type": "STATUS",
          "value": "Completed"
        }
      ],
      "to": [
        {
          "type": "STATUS",
          "value": "Work in Progress"
        }
      ]
    }
  },
  "components": [
    {
      "component": "CONDITION",
      "type": "jira.issue.condition.jql",
      "value": {
        "queryString": "issuetype = 'Work Type = Incident'"
      }
    },
    {
      "component": "ACTION",
      "type": "jira.comment.add",
      "value": {
        "comment": "This incident has been reopened from 'Completed'. Please add a comment explaining the reason for this rework."
      }
    }
  ]
}
a4j-rule-005
Auto-assign unassigned High/Critical Priority Incidents
Automatically assigns any new unassigned incident with 'High' or 'Critical' priority to ensure it is picked up immediately, preventing delays for critical issues.
Trigger
issue created
Actions
·edit field
Script Jira Automation JSON
{
  "name": "Auto-assign unassigned High/Critical Priority Incidents",
  "state": "ENABLED",
  "canOtherRuleTriggerThis": false,
  "shareTeam": false,
  "tags": [],
  "ruleScope": {
    "resources": [
      "ari:cloud:jira::site/SITE-ID"
    ]
  },
  "trigger": {
    "component": "TRIGGER",
    "type": "jira.issue.created",
    "value": {}
  },
  "components": [
    {
      "component": "CONDITION",
      "type": "jira.issue.condition.jql",
      "value": {
        "queryString": "issuetype = 'Work Type = Incident' AND Priority in ('2 - High', '1 - Critical') AND assignee is EMPTY"
      }
    },
    {
      "component": "ACTION",
      "type": "jira.issue.field.edit",
      "value": {
        "fields": {
          "assignee": {
            "type": "AUTO"
          }
        }
      }
    }
  ]
}
a4j-rule-006
Route Password Reset Incidents to correct group
Automatically sets the 'Assignment Group' to 'Computer/Accessories' for new incidents with a 'Subcategory' of 'Password Reset' or 'Account Unlock', ensuring faster routing to the correct team.
Trigger
issue created
Actions
·edit field
Script Jira Automation JSON
{
  "name": "Route Password Reset Incidents to correct group",
  "state": "ENABLED",
  "canOtherRuleTriggerThis": false,
  "shareTeam": false,
  "tags": [],
  "ruleScope": {
    "resources": [
      "ari:cloud:jira::site/SITE-ID"
    ]
  },
  "trigger": {
    "component": "TRIGGER",
    "type": "jira.issue.created",
    "value": {}
  },
  "components": [
    {
      "component": "CONDITION",
      "type": "jira.issue.condition.jql",
      "value": {
        "queryString": "issuetype = 'Work Type = Incident' AND Subcategory in ('Password Reset', 'Account Unlock') AND 'Assignment Group' is EMPTY"
      }
    },
    {
      "component": "ACTION",
      "type": "jira.issue.field.edit",
      "value": {
        "fields": {
          "Assignment Group": {
            "value": "Computer/Accessories"
          }
        }
      }
    }
  ]
}