Create report on Incidents upgraded to P1 or downgraded from P1 to lower Priority
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-16-2021 09:44 AM
Hello ALL,
I need to create a report -specific to any Incidents upgraded to P1 or downgraded from P1 to something else
I did the following:
1. I created Metric Report>Metrics --> Definitions --> New
with the following criteria
See screen shot
2. Created new Report using Incident Metric Definition=Priority
See screen shot
How can I narrow this report to show upgrades to P1 or any downgrades of P1?
thanks much
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-16-2021 11:33 PM
Hi, the metric data you are recording is the current priority of a task, not a change in priority.
The metric definition functionality has access to the 'current' task record but I don't think you can get 'previous' values so may not be able to record 1 entry per priority change (at least not without a bit of messy scripting) .
A simple fix would be a custom text field on your task table and a before BR that sets a string IE
'Priority Upgraded to P1 from P3', you could then generate metrics for this new field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-17-2021 12:04 AM
Hi,
Add a flag(Boolean type) field to an incident table and write a business rule 'after update' that sets the flag when 'priority' changes from "P1 to any" or "any to P1".
Then create a report where it shows only records whose flag is set.
Field: Flag
Type: Yes/No
Business Rule:
When: After Update
Condition: Priority Changes
Script:
current.flag=false;
if ( (previous.priority == 1 && current.priority > 1) || (previous.priority > 1 && current.priority == 1 ))
{
current.flag=true;
}
Report:
Select type of report you want.
Filter:
Active is True
Flag is True
If you want to show priority upgrade incidents and downgrade incidents separately, then change the flag type to int and set 1 for upgrade and 2 for downgrade and 0 otherwise.
current.flag=0;
if((previous.priority > 1 && current.priority == 1 )
current.flag=1;
else if( (previous.priority == 1 && current.priority > 1)
current.flag=2;
Report condition:
flag is not 0
group by flag
Please mark as 'Accepted Answer' if this solves your requirement.
Thank you,
Sharath Allam,
Kaptius - ServiceNow Premier Partner.
Senior Lead Consultant, Kaptius
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2023 04:04 AM - edited ‎01-31-2023 04:07 AM
Hi all,
Please create report as per below screenshot, mark this answer useful if this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2023 11:36 AM
@Eddie5 , reporting on core system tables may result in platform performance issues and this is not a best practice solution. The appropriate approach is to record the data as a metric, or via additional table field and report against this.