Notifications

49 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

SR - IRM - Audit Management - New York 2019 Q3
SR - IRM - GRC Profiles - Madrid 2019 Q2
SR - IRM - GRC Workbench - New York 2019 Q3
SR - IRM - PA Premium Integration - New York 2019 Q3
SR - IRM - Policy and Compliance - Madrid 2019 Q2
SR - IRM - Policy and Compliance PA Content - Madrid 2019 Q1
SR - IRM - Risk Management - New York 2019 Q3
SR - IRM - Risk Management PA Content - Madrid 2019 Q1
SR - IRM - Vendor Risk Management - Madrid 2019 Q1

Fixed In

Orlando

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2020-09-16 03:03:04
Published:2019-07-31