Require a Solution in Order to Resolve
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:
- Save your Schema changes
- Stop the Service Desk service
- Run pdm_publish from a command line
- Start the Service Desk service