Put Resolution notes in comments without triggering comments notification

Brian Lancaster
Tera Sage

I have a requirement where they want the resolution notes added as a comment but do not want the comment notification to go out.  My thought was to add a condition to the notification state is not resolved but they do not want to block the notification going out if it is manually added not matter the state.  Any thoughts on how this can be done?  My only other though was to add another journal entry field that does not have a notification with it and is not visible on the ITIL user form.  I would just add to it with a business rule.

1 ACCEPTED SOLUTION

This was close but at first it would always return true.  I ended up change the code.  It did not seem to like the not in from of the index of even thought it would return false when close notes was empty.  The updated code that has been tested and seems to be working is below.

answer = true;
if (GlidePluginManager.isActive('com.sn_cs_sm')) {
    answer = new sn_cs_sm.ServiceManagementIncidentUtils().isValidCallerForIncNotif(current.caller_id.getRefRecord());
}
if (answer == true && current.close_notes != "") {
    //If the comments do not start with what is in the resolution notes, then answer is true.
    if (current.comments.indexOf(current.close_notes > -1)) {
        answer = false;
    }
}

 

View solution in original post

7 REPLIES 7

BryanS413339635
Tera Guru

Why wouldn't they just use the work notes field. Same concept as comments, but no notification. Is an additional requirement that the comments not appear in the activity?

Because out of the box the only time the end user sees resolution notes is when they get the resolved notification.  They want it to appear in the activity as well.

May be with an advanced condition

run();
function run(){
	return !((current.comments.indexOf(current.close_notes) == 0));
}
Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Vinod Kumar Kachineni
Community Rising Star 2022

How would that fit in with what is already there.  This is currently not installed but will most likely be in the near future.

answer = true;
if (GlidePluginManager.isActive('com.sn_cs_sm')){
    answer = new sn_cs_sm.ServiceManagementIncidentUtils().isValidCallerForIncNotif(current.caller_id.getRefRecord());
}