Difference between revisions of "Set Defaults on Manual Notify"

From SDU
Jump to: navigation, search
(Step 1. Edit the nf.htmpl form)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
I had a requirement for the assigned group and ticket customer to be defaulted in the recipients list for manual notifications in Service Desk. I know you can set them as object contacts for the Manual Notify activity notification - but that will not allow you to turn it off on the fly. For instance - 90% of Manual notifications go to the group or customer. Sometimes, I want to add more recipients or take group and/or customer away.
+
__NOTOC__
 +
[[Category:Customizations]]
 +
{{Global Header}}
 +
{{Global Announcement}}
  
I put the following mod on nf.htmpl
+
== Overview ==
 +
This article provides instructions on how to automatically set the recipients of a [[Manual Notification]] to Affected End User and Group and then have the ability to remove them.
  
In the head section is a JS function called InitNames
+
== Procedures ==
 
+
=== Step 1. Edit the nf.htmpl form ===
At the beginning of that function is a <PDM_IF> block...just after that block, I use the following JS code:
+
In the head of nf.htmpl, look for the following code:
 
+
<source lang="javascript"> function initNames() {
CODE
+
<PDM_IF $dob.notify_list.length == 0>
if (document.main_form.in_names.value == ''){
+
// Cope with Netscape's lack of resizing:
 +
document.main_form.notify_list.options.length = 0;
 +
</PDM_IF></source>and place this code directly below it:
 +
<source lang="javascript">if (document.main_form.in_names.value == ''){
 
document.main_form.in_names.value = '$args.customer.combo_name::$args.group.last_name';
 
document.main_form.in_names.value = '$args.customer.combo_name::$args.group.last_name';
 
document.main_form.in_ids.value = '$args.customer.id $args.group.id';
 
document.main_form.in_ids.value = '$args.customer.id $args.group.id';
}
+
}</source>
  
[[Category:Customizations]]
+
For r11.x releases it is recommended that you edit your pages via the [[Web Screen Painter]]. For older releases you must edit the files directly.
 +
 
 +
For r12.6 release, functionality is found in the Notifications.  Add a Requestor and/or Affected End User to Administrator Tab>>Notifications>>Activity Notifications>>Manual Notify>>Object Contact Recipients tab.  Adding the Requestor and/or Affected End User objects to this tab will then set those objects as the default Available Recipients on the Manual Notify form.
 +
 
 +
=== Step 2. Clear the web cache ===
 +
The final step is to clear Service Desk's cache. The methods vary depending on release.
 +
 +
''For r11.x releases'' publish your changes via the [[Web Screen Painter]]. The process of publishing automatically initiates a [[pdm_webcache]].
 +
 
 +
''For older releases'' execute [[pdm_webcache]] from a command prompt on the [[Primary Server]]. There is no need to run this command on the [[Secondary Server|Secondary Servers]].

Latest revision as of 15:36, 17 September 2012

To make corrections or additions to this article, select the edit tab above.
To discuss or ask questions about this article, select the discussion tab above.

Overview

This article provides instructions on how to automatically set the recipients of a Manual Notification to Affected End User and Group and then have the ability to remove them.

Procedures

Step 1. Edit the nf.htmpl form

In the head of nf.htmpl, look for the following code: <source lang="javascript"> function initNames() { <PDM_IF $dob.notify_list.length == 0> // Cope with Netscape's lack of resizing: document.main_form.notify_list.options.length = 0; </PDM_IF></source>and place this code directly below it: <source lang="javascript">if (document.main_form.in_names.value == ){ document.main_form.in_names.value = '$args.customer.combo_name::$args.group.last_name'; document.main_form.in_ids.value = '$args.customer.id $args.group.id'; }</source>

For r11.x releases it is recommended that you edit your pages via the Web Screen Painter. For older releases you must edit the files directly.

For r12.6 release, functionality is found in the Notifications. Add a Requestor and/or Affected End User to Administrator Tab>>Notifications>>Activity Notifications>>Manual Notify>>Object Contact Recipients tab. Adding the Requestor and/or Affected End User objects to this tab will then set those objects as the default Available Recipients on the Manual Notify form.

Step 2. Clear the web cache

The final step is to clear Service Desk's cache. The methods vary depending on release.

For r11.x releases publish your changes via the Web Screen Painter. The process of publishing automatically initiates a pdm_webcache.

For older releases execute pdm_webcache from a command prompt on the Primary Server. There is no need to run this command on the Secondary Servers.