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

answer = true;
if (GlidePluginManager.isActive('com.sn_cs_sm')){
    answer = new sn_cs_sm.ServiceManagementIncidentUtils().isValidCallerForIncNotif(current.caller_id.getRefRecord());
}
if(answer == true)
{
	//If the comments do not start with what is in the resolution notes, then answer is true.
	answer = !((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

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;
    }
}

 

Not resolution notes, work notes. However, those aren't viewable by non-ITIL users. So the requirement is customer viewable in the activity, but no notification; is that correct? If so, your thought about a new field is probably the best approach.