Error message "there are no risk assessments defined for this request" error for all change request"

Ahmet1
Tera Expert

Post Xanadu upgrade in test instance, we cannot fill out risk assessment questionnaire, getting this error message.

Ahmet1_0-1729698202225.png

 

I have reviewed the forum I am getting "there are no risk assessments define... - ServiceNow Community

Suggested to add assessment condition which I've done like this 

Ahmet1_0-1729698145147.png

 

 

Still same error message, any suggestions? Am I adding the condition as specified in the thread correctly?

 

2 REPLIES 2

Patrick Quinlan
Giga Guru

We're having the same issue after upgrading to Xanadu Patch 5......have you gotten any resolution to the issue?

Yes, we contacted ServiceNow whom advised us that the issue is caused by a customised script include "CreateAssessment". They patched the script include for us by adding in two functions at the bottom of the script.

 

First I suggest you check that you have atleast one assessment condition matching the change request criteria. (search assessment_conditions.list in the filter nav bar and hit enter)

Create something like Active = True condition 

Ahmet1_0-1738600992105.png

 

Then test again, if still not working then add the following into your script include "CreateAssessment" somewhere at the bottom

 

	matchesCondition: function(taskGr) {
		if (!taskGr)
			return false;
		var asmtCondGr = new GlideRecord("assessment_conditions");
		asmtCondGr.addActiveQuery();
		asmtCondGr.orderBy("order");
		asmtCondGr.query();
		while (asmtCondGr.next())
			if (GlideFilter.checkRecord(taskGr, asmtCondGr.condition))
				return true;
		return false;
	},

	getMatchingConditionGr: function(gr) {
		if (!gr)
			return null;
		var asmtCondGr = new GlideRecord("assessment_conditions");
		asmtCondGr.addQuery("table", gr.getTableName());
		asmtCondGr.addActiveQuery();
		asmtCondGr.orderBy("order");
		asmtCondGr.query();
		while (asmtCondGr.next())
			if (GlideFilter.checkRecord(gr, asmtCondGr.condition))
				return asmtCondGr;
		return null;
	},

Make sure the script include ends with type as below

Ahmet1_1-1738601064735.png