CAB Workbench does not show any historical agenda items for historical CAB meetings any more after upgrading to QuebecDescriptionAfter upgrading to Quebec, CAB Workbench does not show any historical agenda items for historical CAB meetings any more. This issue does not happen prior to the Quebec upgrade.When viewing the CAB workbench entry for a past CAB meeting, the agenda item list (regardless of agenda item view selected) is empty. However, when viewing the past CAB meeting via Change->Change Advisory Board->All CAB meetings, the agenda items for the meeting do appear on the Agenda Items related list on the CAB Meeting record.Steps to Reproduce On a Quebec instance, complete a CAB Meeting (by processing all agenda items and approving / rejecting them)Close the CAB workbench window Navigate back to the CAB meeting either via calendar or the related link on the meeting record.On the dropdown for agenda items, select "All Agenda Items"NOTE: none of the agenda items displays and viewing the browser console shows javascript error. This workaround needs to be removed once the instance is being upgraded from Quebec.WorkaroundOpen the CABMeeting Script IncludePaste the following method into the script include, this will override the method located in the CABMeetingSNC with a version that has the fix getInitialAgendaState: function() { function createItemState(agendaItemGr) { return { "sysId": agendaItemGr.getUniqueValue(), "taskId": agendaItemGr.task + "", "order": parseInt(agendaItemGr.getValue("order")), "state": agendaItemGr.getValue("state"), "decision": agendaItemGr.getValue("decision") }; } function addAssignmentToState(taskGr, itemState) { itemState.assignment = { "assigned_to": taskGr.assigned_to + "", "requested_by": taskGr.requested_by + "", "cab_delegate": taskGr.cab_delegate + "" }; } function randomIntBetween(min, max) { min = Math.ceil(min); max = Math.floor(max); return Math.floor(Math.random() * (max - min + 1)) + min; } // The maximum number of agenda items to request at a time. var limit = parseInt(this._gs.getProperty("com.snc.change_management.cab.agenda.initial_request_limit", 60)); var skew = parseInt(this._gs.getProperty("com.snc.change_management.cab.agenda.initial_request_skew", 20)); var numRecords = randomIntBetween(limit - skew, limit); var initialStates = ["pending", "in_progress", "paused"]; var startTimer = Date.now(); var agenda = []; var agendaTaskIdx = {}; var nriStat = []; var nriTaskIdx = {}; var agendaItemGr = new GlideRecord(CAB.AGENDA_ITEM); agendaItemGr.addQuery("cab_meeting", this._gr.getUniqueValue()); agendaItemGr.orderBy("order"); agendaItemGr.query(); var taskSysIds = []; while (agendaItemGr.next()) { //Ignore if we can't read it. Don't want this to happen if (!agendaItemGr.canRead()) continue; var taskId = null; if (!agendaItemGr.task.nil()) { taskId = agendaItemGr.task + ""; taskSysIds.push(taskId); } if (initialStates.indexOf(agendaItemGr.getValue("state")) === -1 || agenda.length === numRecords) { var memo = createItemState(agendaItemGr); nriStat.push(memo); if (taskId) { if (!nriTaskIdx[taskId]) nriTaskIdx[taskId] = []; nriTaskIdx[taskId].push(memo); } continue; } var agendaItem = new CABAgendaItem(agendaItemGr); var agendaItemJS = agendaItem.toJS(); // Don't include the task or form info at this point agenda.push(agendaItemJS); if (taskId) { //Build task/agenda item index if (!agendaTaskIdx[taskId]) agendaTaskIdx[taskId] = []; agendaTaskIdx[taskId].push(agendaItemJS); } } var changeForm; var dotWalkFields = []; //Get change request records and augment agenda items var taskGr = new GlideRecord("change_request"); taskGr.addQuery("sys_id", "IN", taskSysIds.join(",")); taskGr.query(); while (taskGr.next()) { if (!taskGr.canRead()) continue; taskId = taskGr.getUniqueValue() + ""; var cabTask = new CABChangeRequest(taskGr); if (!changeForm) { changeForm = cabTask.toSPForm(); dotWalkFields = Object.keys(changeForm._fields).filter(function(fieldName) { if (fieldName.indexOf(".") !== -1) return true; return false; }); } if (agendaTaskIdx[taskId]) { var taskJS = cabTask.toJS(true, dotWalkFields); agendaTaskIdx[taskId].forEach(function(agendaItem) { agendaItem.task.record = taskJS; }); } else if (nriTaskIdx[taskId]) nriTaskIdx[taskId].forEach(function(itemState) { addAssignmentToState(taskGr, itemState); }); } var endTimer = Date.now(); return { "agenda": agenda, "nriState": nriStat, "startTimer": startTimer, "endTimer": endTimer, "tranactionTime": ((endTimer - startTimer) / 1000) + "s", "changeForm": changeForm }; }, Save the script includeRelated Problem: PRB1495080