## Description

Change risk assessment is using a sum of actual values, but should use a sum of actual values multiplied by each question's weight. This is because Survey & Assessment V2 does not offer that same formula for calculation as Survey & Assessment V1. Once Survey & Assessment V2 provides this formula, the work around will not be necessary and should be backed out.

## Steps to Reproduce

Change the value of the weight of some of the questions in a Change Risk Assessment, to something higher than 1. Note that demo data ships all weight values as: 1

Complete a Risk Assessment and note that the calculated value is a sum of the actual values, rather that a sum of actual values multiplied by question weight.

## Workaround

var score = 0;

var gr = new GlideRecord(this.ASMT_METRIC_RESULT);

gr.addActiveQuery();

gr.addAggregate("SUM", "actual_value");

gr.addQuery(this.INSTANCE, asmtInstanceId);

gr.addNotNullQuery("actual_value");

gr.groupBy(this.INSTANCE);

gr.query();

while (gr.next())

score += gr.actual_value * gr.metric.weight;

if (this._log.atLevel(global.GSLog.DEBUG))

this._log.debug("[calcAsmtScore] score: " + score);

return score;

},

**Related Problem: PRB1294688**