Configuration Compliance - Auto Close Test Results Issue The 'Configuration Compliance - Auto Close Test Results' scheduled job is not closing test results as expected.ReleaseCauseWhen we originally looked at the issue, the list view filters were not correctly applied. There are actually no test results that satisfy the 'Auto-close stale test results' configuration.Auto-Close Stale Test Results config - condition: src_ci.last_scan_dateRELATIVELT@dayofweek@ago@30https://<instance_name>.service-now.com/nav_to.do?uri=sn_vulc_auto_close_stale_config.do?sys_id=01b72420879019d02c098406cebb35d3Applied the filter to the test results table, removing records with resolution 'stale' or 'invalid CI' - none returninghttps://<intance_name>.service-now.com/sn_vulc_result_list.do?sysparm_query=src_ci.last_scan_dateRELATIVELT%40dayofweek%40ago%4030%5Eresult!%3Dpassed%5EresolutionNOT%20IN9%5EresolutionNOT%20IN10&sysparm_view= ----- The scheduled job ultimately runs the staleTRs function from AutoCloseUtils script include to close stale test results.https://<instance_name>.service-now.com/nav_to.do?uri=sys_script_include.do?sys_id=3b090cbd2f148110f56ad5f62799b642 staleTRs: function() { var domain = this._getCurrentUserDomain(); var configGr = new GlideRecord("sn_vulc_auto_close_stale_config"); if (!gs.nil(domain)) configGr.addQuery("sys_domain", domain); configGr.addQuery("active", true); configGr.orderBy("order"); configGr.query(); var trClosedCount = 0; while (configGr.next()) { var ignoreStaleTRsForDeferredTRs = configGr.getValue("ignore_stale_trs"); var encodedQueryString = configGr.getValue('condition'); var trGr = new sn_sec_cmn.PagedGlideRecord("sn_vulc_result"); if (!gs.nil(domain)) trGr.addQuery("sys_domain", domain); trGr.addQuery("result", "!=", "passed"); trGr.addEncodedQuery("resolutionNOT IN9^resolutionNOT IN10^resolutionISNOTEMPTY"); if (ignoreStaleTRsForDeferredTRs == '1') trGr.addQuery("state", "NOT IN", ["11", "12"]); //Not in-review or deferred trGr.addEncodedQuery(encodedQueryString); trGr.setSortField("sys_id"); gs.info('SNC Test1'); while (trGr.next()) { gs.info('SNC Test2'); trClosedCount++; trGr.gr.setValue("state", 3); //Closed state trGr.gr.setValue("resolution", 10); //Stale substate trGr.gr.update(); } } return trClosedCount; } ResolutionWorks as expectedRelated Links