Bug in OOB Script (Schedule Job : Auto Close Case) - HRSDDescriptionIssue Definition: Bug in OOB Script (Schedule Job: Auto Close Case) - HRSDgrContext.query(); is not being used, after adding queries.Observed in: Orlando Patch 4, Orlando Patch 7Steps to Reproduce Steps to Reproduce:1. On any OOB instance, open the below OOB scheduled script:/sysauto_script.do?sys_id=8d5f5dfb53032300c128ddeeff7b12bd&sysparm_record_target=sysauto&sysparm_record_row=1&sysparm_record_rows=6&sysparm_record_list=nameCONTAINScase%5EORDERBYname 2. In the script block, after line 56 :"grContext.query();" is missingWorkaround1. Make changes to the auto close case: ( the scheduled job with sys_id - 8d5f5dfb53032300c128ddeeff7b12bd) in line number 53 - 56 if(grCase.hr_service.le_type) {if(new sn_hr_core.hr_CaseUtils()._getActivitySetContextCases(caseId))return;} 2. Make changes to the script include hr_CaseUtils (with sys_id 24c782869f202200d9011977677fcf89) as this :add a method - _getActivitySetContextCases: function(caseId){ var grContext = new GlideRecord('sn_hr_le_activity_set_context'); grContext.addQuery('hr_case',caseId); grContext.addQuery('state','awaiting_trigger'); grContext.query(); return grContext.hasNext(); },3. Run the following background script: new sn_hr_core.hr_CaseUtils()._getActivitySetContextCases('123');This should generate an RCA. Make sure there are two RCAs - one for the script include, and one for the scheduled script.Related Problem: PRB1442036