Duration of the outages raised for few changes are showing as 0 seconds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
The issue affects only a limited number of Change Request/Outage records.
I noticed that, updating and saving the Start Time or End Time recalculates the outage duration correctly. I have been unable to identify the root cause could you please assist me with this. Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Check this
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB2817016
Regards
Dr Atul G. - Learn N Grow Together ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
******************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @Dr Atul - LNG,
Thank you for sharing the KB.
I reviewed the article, but my findings appear to be different from the scenario described there.
For the affected outage records:
- The Begin and End times are populated correctly.
- The records are created with Duration = 0 Seconds from the initial insert itself (verified through History/Audit).
- The value stored in the Duration field is 1970-01-01 00:00:00.
- Updating and saving either the Begin or End field recalculates the duration correctly.
Additionally, I compared a working outage record and found that its Duration is stored correctly (for example, 1970-01-01 04:00:00 for a 4-hour outage), whereas the affected records are inserted with 1970-01-01 00:00:00.
Based on these findings, it appears the issue is not simply a list-view display problem. Rather, some outage records seem to be created without the duration being calculated during the insert process.Is there any OOB logic on the cmdb_ci_outage table responsible for calculating the Duration field during insert that I should specifically investigate?
Appreciate any suggestions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Thank you for sharing the KB.
I reviewed it, but my observations seem different. In the affected records, Begin and End values are populated correctly and the duration is already showing as 0 Seconds at the time of record creation. If I update and save either Begin or End, the duration is recalculated correctly.
This makes me suspect the duration calculation may not be occurring during insert for some outage records rather than being a display issue.
Is there any OOB Business Rule or process on the Outage table that calculates Duration during record creation?
Any suggestions would be appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello @shindeprati
Out of the box before insert and update business rule "Outage Calculations" calculates the duration based upon difference between begin and end and set Duration accordingly.
Navigate to All > System Diagnostics > Script Debugger > Session Debug > Enable All to find out which all such Business Rules are running when you submit/save a new Outage.
Hope that helps!
