- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2020 03:59 AM
Hi All,
Hope everyone is staying safe.
I am seeing the business duration of RITM having blank values. How can I get these values.
And I am leaner of Service-now. I wish to know that, how the process works like closing the catalog tasks will close the RITM and request as well. Is there any OOB BR's or workflow?
Your suggestions help me to learn.
Regards,
Rakesh.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2020 04:18 AM
Hi,
OOB functionality already available on Incident table. Please go through 'mark_closed' business rule on incident table . Use this logic and built new business rule on RITM table to calculate business duration field.
Hope this helps.
If I have answered your question, please mark my response as correct and/or helpful.
Thanks,
Suseela P.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2020 04:18 AM
Hi,
OOB functionality already available on Incident table. Please go through 'mark_closed' business rule on incident table . Use this logic and built new business rule on RITM table to calculate business duration field.
Hope this helps.
If I have answered your question, please mark my response as correct and/or helpful.
Thanks,
Suseela P.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2020 04:26 AM
Hi Suseela,
Thank you. Will try and update.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2020 10:41 AM
Hi Suseela,
It is working fine for newly created ritms after creating BR. But, how can we get the business duration for previously completed RITM's.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2020 12:25 PM
Hi Rakesh,
You can run fix script or background script to update the business duration field on closed RITMs.
For ex:
var qry="active=false^closed_atISNOTEMPTY'';//update the query to retrieve closed RITMs
var gr= new GlideRecord('sc_req_item');
gr.addEncodedQuery(qry);
gr.query();
while(gr.next()){
var opened= gr.opened_at.getDisplayValue();
var closed= gr.closed_at.getDisplayValue();
if(gr.business_duration==''){
gr.business_duration=gs.calDateDiff(opened,closed,false);
gr.update();
}
}
Hope this helps.
If I have answered your question, please mark my response as correct and/or helpful.
Thanks,
Suseela P.