Report: Number of days an incident has been open (then display within days)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2017 02:00 AM
Hi,
Is it possible to create a report showing number of days an incident has been open.
And in this format:
Number of days Numbe rof incidents
1 12
2 45
3 10
4 6
5 1
more than 5 5
And in this format:
Number of days Numbe rof incidents
1 12
<incident details: short_description; number;>
<incident details: short_description; number;>
<incident details: short_description; number;>
2 45
<incident details: short_description; number;>
<incident details: short_description; number;>
3 10
<incident details: short_description; number;>
<incident details: short_description; number;>
<incident details: short_description; number;>
4 6
<incident details: short_description; number;>
<incident details: short_description; number;>
<incident details: short_description; number;>
5 1
<incident details: short_description; number;>
<incident details: short_description; number;>
more than 5 5
(only show number for more than 5 days)
So either or.. the first and/or second report if its possible and how.
Best regards,
- Labels:
-
Dashboard
-
Performance Analytics
-
Reporting

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2017 02:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2017 02:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2017 06:41 AM
HI Rody
Can u pls try like this
I have a Scheduled Job...
...that calls a function in a Script Include:
function u_updateAgingCategoryField() {
var elapsedTime = 0;
var aging = '';
var currentTimeNow = gs.nowDateTime();
var gr = new GlideRecord('incident');
gr.addEncodedQuery('u_aging_category!=>28^ORu_aging_category=');
gr.query();
while(gr.next()) {
elapsedTime = (gs.dateDiff(gr.opened_at, currentTimeNow, true)) /60/60/24;
//check to see when the item was created
if (elapsedTime <= 2) aging = '0_2';
if (elapsedTime > 2) aging = '3_7';
if (elapsedTime > 7) aging = '8_14';
if (elapsedTime > 14) aging = '15_21';
if (elapsedTime > 21) aging = '22_28';
if (elapsedTime > 28) aging = '>28';
gr.setWorkflow(false); //skip any Business Rules
gr.autoSysFields(false); //do not update system fields
gr.u_aging_category = aging;
gr.update();
}
}
Notice in the function that I am excluding incidents >28 days because we do not want to keep updating them with ">28 Days" all the time.
Now for the trick so that the Pivot Table orders the columns properly - on the Aging Category dictionary record, set the Default value to be "0_2" and the Choice field to "Dropdown without -- None --" and create some Choice entries:
Otherwise the report will sort the columns alphabetically. And so you should end up with the following report:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2017 06:47 AM