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

From SDU
Jump to: navigation, search
m (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...)
 
m
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
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.
+
__NOTOC__
 +
[[Category:Customizations]]
 +
[[Category:Incidents]]
 +
[[Category:Problems]]
 +
[[Category:r11]]
 +
[[Category:Requests]]
 +
[[Category:Schema Changes]]
 +
{{Global Header}}
 +
{{Global Announcement}}
  
== Step 1. Create the script ==
+
== Overview ==
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).
+
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 ===
 +
{{Create Spell Script}}
 
<source lang="javascript">cr::zmyscript(...){
 
<source lang="javascript">cr::zmyscript(...){
 
send_wait( 0, this, "get_attr_vals",1,"soln_log.length");
 
send_wait( 0, this, "get_attr_vals",1,"soln_log.length");
Line 20: Line 31:
 
}</source>
 
}</source>
  
 
+
=== Step 2. Create the trigger ===
== 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 '''[[Call Req Table|cr (Request)]]''' table.
 
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 '''[[Call Req Table|cr (Request)]]''' table.
 
<source lang="javascript">PRE_VALIDATE zmyscript() 111 FILTER(status{-> 'RE'});</source>
 
<source lang="javascript">PRE_VALIDATE zmyscript() 111 FILTER(status{-> 'RE'});</source>
  
 
+
=== Step 3. Publish the Schema changes ===
== Step 3. Publish the Schema changes ==
+
{{R11 Publish Schema Change}}
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
+
 
+
 
+
 
+
----
+
<div align='center'><font color="red">To make corrections or additions to this article, select the ''edit'' tab above.<br>
+
To discuss or ask questions about this article, select the ''discussion'' tab above.</font></div>
+
 
+
[[Category:Customizations]]
+

Latest revision as of 05:02, 10 August 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 and Publish your Schema changes
  2. Stop the Service Desk service
  3. Run pdm_publish from a command line
  4. Start the Service Desk service