Changing the (cab automation) meeting notes?

Shawn Gienow
Tera Guru

By default, the auto-generated meeting notes look like the following:

(CAB Automation) - CHG00123456 - Approved - John Smith - 12:31:12 - US/Eastern

We would like to change them to something like:

(CAB Automation) - CHG0030216 - Assignment Group - Risk -  Change Short Description - Approved - Approver - 12:31:12 - US/Eastern

However, I cannot for the life of me find where this automation takes place.   Has anyone worked with this previously?

Thank you!

1 ACCEPTED SOLUTION

Shawn Gienow
Tera Guru

Naveen.. thank you for helping with this 🙂 

Here's what I ended up with, and it did exactly what I need:

updateAgendaDecisions: function(agr, prevGr) {

var decision = '';
if(agr.state == CAB.AGENDA_STATE.NO_DECISION) {
decision = agr.state.getDisplayValue();
}else if((agr.decision != prevGr.decision) && (agr.decision == CAB.AGENDA_DECISION.APPROVED || agr.decision == CAB.AGENDA_DECISION.REJECTED)) {
decision = agr.decision.getDisplayValue();
}else
return;
var session = gs.getSession();
var gdt = new GlideDateTime();
var str = gs.getMessage("(CAB Automation) - {0} - {1} - {2} - {3} - {4} - {5} - {6} - {7}", [agr.task.getDisplayValue(), agr.task.assignment_group.getDisplayValue(), agr.task.risk.getDisplayValue(), agr.task.short_description, decision, gs.getUserDisplayName(), gdt.getUserFormattedLocalTime(), session.getTimeZoneName()]); var autoText = "<p>" + str + "</p>";
this._gr.agenda_decisions_buffer = this._gr.agenda_decisions_buffer + "" + autoText;
this._gr.update();
}

View solution in original post

11 REPLIES 11

This might be needed

var meetingGr = this._gr.cab_meeting.getRefRecord();
 
and use meetingGr for update meetingGr.update();

Shawn Gienow
Tera Guru

Naveen.. thank you for helping with this 🙂 

Here's what I ended up with, and it did exactly what I need:

updateAgendaDecisions: function(agr, prevGr) {

var decision = '';
if(agr.state == CAB.AGENDA_STATE.NO_DECISION) {
decision = agr.state.getDisplayValue();
}else if((agr.decision != prevGr.decision) && (agr.decision == CAB.AGENDA_DECISION.APPROVED || agr.decision == CAB.AGENDA_DECISION.REJECTED)) {
decision = agr.decision.getDisplayValue();
}else
return;
var session = gs.getSession();
var gdt = new GlideDateTime();
var str = gs.getMessage("(CAB Automation) - {0} - {1} - {2} - {3} - {4} - {5} - {6} - {7}", [agr.task.getDisplayValue(), agr.task.assignment_group.getDisplayValue(), agr.task.risk.getDisplayValue(), agr.task.short_description, decision, gs.getUserDisplayName(), gdt.getUserFormattedLocalTime(), session.getTimeZoneName()]); var autoText = "<p>" + str + "</p>";
this._gr.agenda_decisions_buffer = this._gr.agenda_decisions_buffer + "" + autoText;
this._gr.update();
}

Ian22
Tera Contributor

This looks like what we are wanting to do as well

do we include the updateAgendaDecisions: function in the CABRuntimeState script include or somewhere else?

Sorry for the slow reply here, I missed this..   You edit the CABRuntimeState script include, and put the entire function in there.

However, I've run into an issue with NY Patch 7, where they've removed the entire function for updateAgendaDecisions in the CABRuntimeStateSNC script include, so it no longer functions.   I just opened a HI ticket about this and will update here.

Shawn Gienow
Tera Guru

So they changed where it is, to now be "CABAgendaItemSNC, and the function is now "addDecisionToMeetingNotes," in that script include.

Here is what mine is, now that I have it working again:

var CABAgendaItem = Class.create();

CABAgendaItem.TASK_FIELDS_FOR_ATTENDEES = ["assigned_to", "cab_delegate"];

CABAgendaItem.prototype = Object.extendsObject(sn_change_cab.CABAgendaItemSNC, {
// Added from here
addDecisionToMeetingNotes: function() {
var decision = this._gr.state +"" === CAB.AGENDA_STATE.NO_DECISION ?
this._gr.getDisplayValue("state") : this._gr.getDisplayValue("decision");

var message = "<p>" +
gs.getMessage("(CAB Automation) - {0} - Start Time: {1} - {2} - Risk: {3} - {4} - {5} - {6} - {7} - {8}", [this._gr.task.getDisplayValue(),this._gr.task.start_date.getDisplayValue(), this._gr.task.assignment_group.getDisplayValue(), this._gr.task.risk.getDisplayValue(), this._gr.task.short_description, decision, this._gs.getUserDisplayName(),new GlideDateTime().getUserFormattedLocalTime(),this._gs.getSession().getTimeZoneName()]);+
"</p>";

var meetingGr = this._gr.cab_meeting.getRefRecord();
meetingGr.meeting_notes = meetingGr.meeting_notes.nil() ? message : meetingGr.getDisplayValue("meeting_notes") + message;
meetingGr.update();
},
// To here
type: 'CABAgendaItem'
});

// Bindings for namespaced code
CABAgendaItem.newAgendaItem = CABAgendaItemSNC.newAgendaItem;