"Risk and Impact remain unchanged" display on initial save/insert when change matches a Change Risk Assessment and "glide.ui.risk_calculate_rule" to business ruleDescription"Risk and Impact remain unchanged" display on initial save/insert when change matches a Change Risk Assessment and "glide.ui.risk_calculate_rule" to business rule. Risk Conditions are a fully automated process insofar as no human interaction is required for them to run.Risk Assessments are a fully manual process where a human interaction is required, i.e. completing the Assessment. Therefore when both Risk Conditions and Risk Assessment match a Change Request, even when the properties have enabled Business Rule rather than UI Action driven risk evaluation, the UI Action overrides the Business Rule (because a human interaction is required). However evaluation of whether a Change Risk Assessment matches a change request is done against the change request record in the database. So on initial save/insert Risk is evaluated (record is not in database, so does not match Change Risk Assessment) and shows "Risk and Impact remain unchanged" message (or variant thereof depending on the risk evaluation result) . On subsequent updates to the change request record the change request does match a Change Risk Assessment and the UI Action overrides the Business Rule (because a human interaction is required).Steps to Reproduce Make sure the status of the below plugins: com.snc.change_management.risk_assessment "Installed"com.snc.change.risk_assessment "Not Installed" 1. Set the system property "glide.ui.risk_calculate_rule" to business rule2. Create a Normal Change.3. Enter required fields.4. Enter "Planned Start Date" and "Planned End Date"5. Save the record.6. Risk Assessment Message is displayed.7. Edit the "Planned End Date". Expected: No message should display.Actual: "Based on the calculation, risk and impact remain unchanged." or "Risk and Impact remain unchanged" message or variant thereof depending on the risk evaluation result is displayed.WorkaroundModify script include: ChangeRiskAsmt adding the following functions: var ChangeRiskAsmt = Class.create(); ChangeRiskAsmt.prototype = Object.extendsObject(ChangeRiskAsmtSNC, { hasAssessment: function(changeRequestGr) { var _hasAssessment = this._getMatchingRiskAsmts(changeRequestGr || this.changeRequestGr).length > 0; if (this._log.atLevel(global.GSLog.DEBUG)) this._log.debug("[hasAssessment] _hasAssessment: " + _hasAssessment); return _hasAssessment; }, // returns changeRiskAsmtSysIds that match both definition, category and category has a question _getChangeRiskAsmtSysIds: function(changeRiskAsmtGr, changeRiskAsmtSysIds, changeRequestGr) { changeRiskAsmtSysIds = Array.isArray(changeRiskAsmtSysIds) ? changeRiskAsmtSysIds : []; if (!changeRiskAsmtGr) return changeRiskAsmtSysIds; while (changeRiskAsmtGr.next()) { var definitionCondition = changeRiskAsmtGr.getValue(this.CONDITION); // Check Assessment matches Change Request if (GlideFilter.checkRecord(changeRequestGr, definitionCondition)) { if (this._log.atLevel(global.GSLog.DEBUG)) this._log.debug("[_getChangeRiskAsmtSysIds] matched condition of asmt: " + changeRiskAsmtGr.name.getDisplayValue()); var metricCategorySysIds = []; var metricCategoryGr = new GlideRecord(this.ASMT_METRIC_CATEGORY); metricCategoryGr.addQuery(this.METRIC_TYPE, changeRiskAsmtGr.getUniqueValue()); metricCategoryGr.query(); while (metricCategoryGr.next()) { var categoryCondition = metricCategoryGr.getValue(this.FILTER); // Check Assessment Category matches Change Request if (GlideFilter.checkRecord(changeRequestGr, categoryCondition)) { if (this._log.atLevel(global.GSLog.DEBUG)) this._log.debug("[_getChangeRiskAsmtSysIds] matched condition of asmt category: " + metricCategoryGr.name.getDisplayValue()); metricCategorySysIds.push(metricCategoryGr.getUniqueValue()); } } if (metricCategorySysIds.length) { var metricGr = new GlideRecord(this.ASMT_METRIC); metricGr.addQuery("category", metricCategorySysIds); metricGr.query(); // Check Assessment Category has at least one question if (metricGr.hasNext()) { changeRiskAsmtSysIds.push(changeRiskAsmtGr.getUniqueValue()); if (this._log.atLevel(global.GSLog.DEBUG)) this._log.debug("[_getChangeRiskAsmtSysIds] matched asmt category has a question, so its valid"); } } } } return changeRiskAsmtSysIds; }, _getChangeRiskAsmtsByConditions: function(changeRequestSysId, tableName) { if (!changeRequestSysId) return []; tableName = this._getTableName(tableName); if (!tableName) return []; var changeRequestGr = new GlideRecord(tableName); if (!changeRequestGr.get(changeRequestSysId)) return []; return this._getMatchingRiskAsmts(changeRequestGr); }, _getMatchingRiskAsmts: function(changeRequestGr) { if (!changeRequestGr) return []; var changeRiskAsmtSysIds = this._getChangeRiskAsmtSysIds(this.getAsmtByConditionTable(changeRequestGr.getTableName()), null, changeRequestGr); if (this._log.atLevel(global.GSLog.DEBUG)) this._log.debug("[_getMatchingRiskAsmts] changeRiskAsmtSysIds: " + changeRiskAsmtSysIds.toString()); return changeRiskAsmtSysIds; }, type: 'ChangeRiskAsmt' }); Related Problem: PRB1580285