Change Review process
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2023 08:01 AM - edited 01-25-2023 10:17 AM
Hi Team,
A Pop-up message has to appear to the change managers when a service attached to the change is not operational status
I have created the Display BR and also client script for this.
Regards
Vivek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2023 08:18 AM
Hi,
(function executeRule(current, previous /*null when async*/ ) {
var statusArr = [];
var serviceGR = new GlideRecord('task_cmdb_ci_service');
serviceGR.addEncodedQuery('task='+current.getUniqueValue().toString());
serviceGR.query();
while (serviceGR.next()) {
statusArr.push(serviceGR.cmdb_ci_service.operational_status.getDisplayValue()); //1 = operational;2 = non-operational
}
gs.info('statusArr:: '+statusArr);
var arrayUtil = new ArrayUtil();
if (arrayUtil.indexOf(statusArr, "Operational") == -1) // present operational service
g_scratchpad.operation_status = "all non-operational";
else
g_scratchpad.operation_status = 'operational';
})(current, previous);
function onLoad() {
if (g_scratchpad.operation_status == 'all non-operational')
alert("Please confirm there are no configuration updates as a part is this change");
}
Regards,
Hardik
**Please mark my answer correct or helpful based on the impact**
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2023 08:50 AM
Hi @Hardik2109,
Thanks, But the script part that I have completed already. I need the next step further that needs to be done for a story
Regards
Sai