Difference between revisions of "Require a Solution in Order to Resolve"

From SDU
Jump to: navigation, search
m
m
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
[[Category:Customizations]]
 
[[Category:Customizations]]
<div align='center'><font color="green">To make corrections or additions to this article, select the ''edit'' tab above.<br>
+
{{Global Header}}
To discuss or ask questions about this article, select the ''discussion'' tab above.</font></div>
+
{{Global Announcement}}
  
 
== Overview ==
 
== Overview ==

Revision as of 00:57, 27 July 2008

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 for requiring that a solution be provided prior to setting a ticket to the 'Resolved' Status. This customization works only in r11.x releases.

Procedures

Step 1. Create the script

A script is created as an .spl file and placed in the $NX_ROOT/site/mods/majic directory. When the Service Desk service starts, the contents of the majic directory are processed and cached. You can use any naming scheme you like for your .spl file, but it is recommended that the file be preceded with a 'z' for easy identification as a custom file (eg zMyCompany.spl, zcr_scripts.spl, zMyScripts.spl). <source lang="javascript">cr::zmyscript(...){ send_wait( 0, this, "get_attr_vals",1,"soln_log.length"); if (msg_error()) { logf(ERROR, "error getting soln_log.length for %s %s - %s", type, ref_num, msg[0]); return; } int zsoln_length; zsoln_length = msg[3]; if (zsoln_length == 0) { string zmsg; zmsg=format("Provide a 'Solution' before setting this %s to Resolved.", type.sym); set_error(1); set_return_data(zmsg); } }</source>

Step 2. Create the trigger

This step is to create the trigger that will initiate the script. Use the Schema Designer utility to add the following code as a Site-Defined Trigger to the cr (Request) table. <source lang="javascript">PRE_VALIDATE zmyscript() 111 FILTER(status{-> 'RE'});</source>

Step 3. Publish the Schema changes

Follow these steps for publishing the schema changes:

  1. Save your Schema changes
  2. Stop the Service Desk service
  3. Run pdm_publish from a command line
  4. Start the Service Desk service