Change management - Risk Assessment Weighted score - whats wrong?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2020 05:31 AM
Hello Community,
I have a very hard time understanding how the risk assessment in Change Management is working,
My client wants to use a weighted score method, i.e. some question will be more important than others. At first glance this fits perfectly with ServiceNow Risk Assessment. The documentation states “
“The assessment uses a weighted score approach for each question. The composite weighted score derived from the answer of the end user is used to calculate risk”
However, my experience showed that the Assessment Score which is compared with the thresholds is a basic sum of all metrics values. So, no weight is being taken into account.
I looked at the script includes “ChangeRiskAsmt” and I see the function to calculate the score is as follows:
// adds all weighted scores to calculate the composite score calcAsmtScore: function(asmtInstanceId) { var score = 0; var ga = new GlideAggregate(this.ASMT_METRIC_RESULT); ga.addActiveQuery(); ga.addAggregate("SUM", "actual_value"); ga.addQuery(this.INSTANCE, asmtInstanceId); ga.addNotNullQuery("actual_value"); ga.addQuery("actual_value", ">=", "0"); ga.groupBy(this.INSTANCE); ga.query(); if (ga.next()) score = ga.getAggregate("SUM", "actual_value");
if (this._log.atLevel(global.GSLog.DEBUG)) this._log.debug("[calcAsmtScore] score: " + score);
return score; }, |
I confirmed this by playing with the thresholds and indeed the Score is just a sum of all values. Which is not right.
To add to the confusion, I found this KB “KB0782241” which states
“Risk value is calculated as score += actual_value * metric.weight; not just the sum of actual values. This is expected OOB behavior.”
So now I`m totally confused.
You probably noticed that the script sums the actual_value. So, I assumed that the actual_value might be the Value * Weight – but it is not. The actual value is equal to the Value of the metric definition
also mentioned here .
Does someone have any experience with this? Any help will be appreciated.
Regards,
- Labels:
-
Change Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2020 12:03 AM
This is what I found!
In Madrid the value being summarized is actual_value. Since "The actual value is equal to the Value of the metric definition associated with the chosen answer option",the script does not return weighted score but just a score //sum of values of all answers.
Checking in New York the script includes (ChangeRiskAsmt) has been updated and it summarizes the normalized_value. It seems this is more correct as normalized_value will actually return the value*weight. However, I observed that the normalized value will be set with negative value on the first response of a category. I couldn't figure out why or how the value is being calculated.
I did found out though that there is a third filed, which is not shown in the form. It is called weighted_value it works exactly as expected. I have no idea why it is not used in the script.
So all I had to do, was to change the actual_value, in Madrid and normalized_value, in New York with weighted_value and now the Script returns the weighted score.
I`m yet to find how to use the categories weight but this is another topic.
BTW the fields mentioned above are in asmt_metric_result table.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2020 10:46 AM
This was a huge help! We noticed all of our risk assessments post NY upgrade always went high no matter how we answered them.
We eventually found this thread and found joy after changing the weighted values to match the actual values on the assessment metrics for our risk assessment.
I'm still trying to track down anything in the release notes that explains this change in New York/from Madrid up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2020 07:57 PM
Nicola this saved us so much pain - thank you! We now know whats going on and we fixed the incorrect calculations. THANK YOU SO MUCH.