SLA breached report

JazzG
Kilo Contributor

Hi Seeking for your assistance on how to extract those ticket that are status are in red - SLA breached.

 

JazzG_0-1778754325182.png

 

4 REPLIES 4

Naveen20
ServiceNow Employee
The red breached indicator comes from the task_sla table where the has_breached field is true. Query that table directly, then group or dot-walk to the parent task to get the tickets.

Quickest way (list view filter):
1. Navigate to task_sla.list (Service Level Management > Task SLAs).
2. Add filter: Has breached is true (optionally also Active is true to exclude completed/cancelled SLAs).
3. Personalize the list to show Task, SLA, Business time left, Stage.
4. Right-click the column header > Export to get the ticket numbers.

Script equivalent:

var sla = new GlideRecord('task_sla');
sla.addQuery('has_breached', true);
sla.addQuery('active', true);
sla.query();
while (sla.next()) {
gs.info(sla.task.number + ' breached ' + sla.sla.getDisplayValue());
}

Note: a task can have multiple task_sla records (response, resolution, OLAs), so the same ticket may appear more than once — de-duplicate on task if needed.

Ankur Bawiskar
Tera Patron

@JazzG 

this information is stored in task_sla

Why not extract the details from there?

where are you stuck?

AndersBGS
Tera Patron

Hi @JazzG ,

 

why not just create a report based on task_sla where breached = true?

 

Tanushree Maiti
Tera Patron

Hi @JazzG 

 

Method 1: List View  of task_sla table

  1. Type task_sla.list into Application Navigator filter and press Enter.
  2. Click the filter icon and add the conditions: Has breached is true.
  3. Add an optional condition Active is true to exclude completed/cancelled SLAs.
  4. Right-click any column header and select Export to download the list to Excel or CSV.

 

Method 2: Reporting

  1. Navigate to Reports -> Create New.
  2. Set the Source type to Table and select task_sla.
  3. In the Filter condition, set: Has breached is true.
  4. To see the actual ticket data, click the Group by option and select Task.
  5. Run the report and click Export to extract the data.