- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-23-2016 02:35 AM
Hi Community,
I have a question relating to the service status widget in an OOB service portal.
Currently when we register an outage, it shows correctly in the "Current Outage" section on the portal homepage, and clicking on system status also shows the current outage information.
What I have noticed is that whilst an outage is on-going, clicking the affected business service does not show a red mark for the current day in the widget on the system status page (Business Service - Last 90 days), it will only go red once the outage has finished.
1.
2.
I understand that the default functionality is to show historical outages on this particular widget, hence why this widget only shows a red mark once the outage is finished. But is there a way for this widget to show a red mark whilst the outage is on-going?
Everything is OOB at the moment so I haven't changed any coding yet, so any ideas here would be appreciated.
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-23-2016 07:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-23-2016 07:26 AM
oh sorry, it was line 9 that needed to be changed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-23-2016 07:42 AM
Thanks for the superb help Lars. It's all working now

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2018 11:35 AM
Thanks for this.
This wasn't a requested feature (we haven't gone live yet, but I'm nearing finalization) however, this seemed like a good idea to have implemented so I've cloned the service status widget and made these changes to lines 11-23 and to confirm to anyone else who may be reading this, you will have to add an extra ) at the end of the line that he posted as "oh sorry, it was line 9 that needed to be changed". The extra ) is needed to close out the code before the ending ; - otherwise you'll see a red x indicating a problem with that line of code.
Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-01-2019 02:50 PM
I realize this is a super old post, but has anyone tried doing something similar by copying the Business Services Status widget? My code below using @larstange and @Allen A responses but it still is not showing in the widget unless the outage is closed.
var svc = {};
svc.sys_id = svs.getUniqueValue();
svc.name = svs.getDisplayValue();
svc.safeName = GlideStringUtil.escapeHTML(svc.name);
svc.subscribed = isSubscribed(svc.sys_id);
var outs = [];
for (var i = 0; i <= 4; i++) {
var out = new GlideAggregate("cmdb_ci_outage");
out.addQuery("cmdb_ci", svs.getUniqueValue());
if (i > 1)
out.addQuery("end", ">=", gs.daysAgoStart(i));
else
out.addQuery("end", ">=", gs.daysAgoStart(i).addOrCondition("end", "=", "NULL"));
out.addQuery("begin", "<=", gs.daysAgoEnd(i));
out.addAggregate('COUNT', 'type');
out.query();
var svcOutageDay = {};
svcOutageDay.count = 0;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2020 09:08 AM
Please have below code applied to make it work and consider for open outages.
//out.addQuery("end", ">=", gs.daysAgoStart(i));
var dtend = out.addQuery("end", ">=", gs.daysAgoStart(i));
dtend.addOrCondition("end", "=", "NULL");