Require a Solution in Order to Resolve

From SDU
Revision as of 17:18, 15 May 2008 by Gityerfix (Talk | contribs) (New page: 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. == Step 1...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.

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



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.