Notifications

31 views

Description

In case there are many survey instances associated with a survey, submitting a survey from Service Portal will take longer than expected.

Steps to Reproduce

Make sure there are many survey instances (we've seen the issue with 800.000 records) associated with a survey

1. Go to service portal and open the survey
2. Fill out the survey and submit.

See it may take too long to submit (we've experienced around 10 seconds)

Workaround

The issue is caused by the query below, in the method saveMultipleCheckboxesAndRanking() in the script include “AssessmentSubmitProcessor”, 


var qst = new GlideRecord("asmt_assessment_instance_question");
qst.addQuery('metric', metric);
qst.addQuery('source_id', source_id);
qst.query();

The query is too broad and there are around 90k records meet the condition. The solution is to make it narrow by adding another condition as below, 
var qst = new GlideRecord("asmt_assessment_instance_question");
qst.addQuery('metric', metric);
qst.addQuery('source_id', source_id);
qst.addQuery(‘instance’, instance); // add this line to narrow down the query
qst.query();


Related Problem: PRB1353755

Seen In

There is no data to report.

Fixed In

Orlando

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2019-07-31 07:39:52
Published:2019-07-31