Business Elpased Time List View for Incidents

Britton
Mega Contributor

Good day, I'm able to see the business elapsed time when I report on the SLA table, however when I report on the incident table I can only select 'business duration' for a column, however this doesn't appear to take into account pause conditions like 'business elapsed time' does. 

In the end I want a report in a list view that shows the 'business elapsed time' on incidents without any associated incident tasks.  Similar to the below but I can only get 'business duration' as shown below to appear which apparently doesn't take into consideration pause conditions on our SLA such as 'on hold' states.  Any help is appreciated!

 

find_real_file.png

Thanks!

5 REPLIES 5

Ruhi Jibhyenka1
Mega Guru

Hi britton,

Create date/time type of field named as u_business_elapsed_time on incident form.

Write business rule- before,insert,update

(function executeRule(current, previous /*null when async*/) {

// Add your code here
var gr=new GlideRecord('task_sla');
gr.addQuery('task',current.sys_id);
gr.query();
if(gr.next())
{
current.u_business_elapsed_time=gr.business_elapsed_time;
current.update();
}

})(current, previous);

On list view, just configure this field from context menu and add the field, from slush bucket, the field will be displayed in list.

If you want to display current status of time in the form of colour then

Go on the incident form, right-click on business elapsed time field -> confgiure dictionary-> click on Advanced View link, in Attribute field paste this-  

target_threshold_colors=0:#08e12b;50:#eff214;75:#f62505

Mark Correct if this solves your issue and also mark Helpful if you find my response worthy.

Thanks,

Ruhi.

Britton
Mega Contributor

Thank you Ruhi, would this also populate for incidents that were already marked closed as well?

 

Thanks!

Britton
Mega Contributor

I created the new form field as said and the business rule however it doesn't seem to be populating.  I created the business rule on the incident table, was this correct?  Thanks!

Yes, you need to create business rule on incident table. Check out the above given business rule and modify and check the field type according to your field name- the one which you want to populate and the one on basis of which you want to populate.

Kindly mark Correct if this solves your issue and also mark Helpful if you find my response worthy.

Thanks,

Ruhi.