Difference between revisions of "Simplified Child Creation"

From SDU
Jump to: navigation, search
(Step 3. Clear the web cache)
m (Reverted edits by Agegeleruvy (Talk); changed back to last version by Gityerfix)
 
(38 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
__NOTOC__
 +
[[Category:Change Orders]]
 +
[[Category:Customizations]]
 +
[[Category:Incidents]]
 +
[[Category:Issues]]
 +
[[Category:Problems]]
 +
[[Category:Requests]]
 +
[[Category:r6]]
 +
[[Category:r11]]
 +
[[Category:r12]]
 +
[[Category:Schema Changes]]
 +
{{Global Header}}
 +
{{Global Announcement}}
 +
 +
== Overview ==
 
This article contains instructions for expediting the child creation process by using information from the parent ticket.  
 
This article contains instructions for expediting the child creation process by using information from the parent ticket.  
  
== Step 1. Create the button ==
+
This customization is known to work in all currently supported releases of Service Desk.
 +
 
 +
== Procedures ==
 +
=== Step 1. Create the button ===
 
The first step is to add a "Create a Child" button to the Parent/Child tab.  
 
The first step is to add a "Create a Child" button to the Parent/Child tab.  
  
 
'''For Requests, Incidents, and Problems:'''<br>
 
'''For Requests, Incidents, and Problems:'''<br>
Add the following code to cr_relreq.htmpl for Requests, in_relreq.htmpl for Incidents, or pr_relreq.htmpl for Problems.
+
Add the following code to cr_relreq_tab.htmpl for Requests, in_relreq_tab.htmpl for Incidents, or pr_relreq_tab.htmpl for Problems.
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;PDM_IF $args.id != 0&#62;<br>ImgBtnCreate&#40;"makechild", "Create Child", "create_new&#40;&#39;cr&#39;,0,0,0,&#39;PRESET=type&#58;$args.type&#39;,&#39;INITFROM=make_child&#39;&#41;", true, 0,"Create a Child"&#41;; <br>&#60;/PDM_IF&#62;<!--c2--></div><!--ec2-->
+
<source lang="html4strict">
 
+
<PDM_IF $args.id != 0>
 +
ImgBtnCreate("makechild", "Create Child",
 +
            "create_new('cr',0,0,0,'PRESET=type:$args.type','INITFROM=make_child')",
 +
            true, 0,"Create a Child");
 +
</PDM_IF>
 +
</source>
  
 
'''For Change Orders:'''<br>
 
'''For Change Orders:'''<br>
 
Add the following code to chg_relchg.htmpl.
 
Add the following code to chg_relchg.htmpl.
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;PDM_IF $args.id != 0&#62;<br>ImgBtnCreate&#40;"makechild", "Create Child", "create_new&#40;&#39;chg&#39;,0,0,0,&#39;&#39;,&#39;INITFROM=make_child&#39;&#41;", true, 0,"Create a Child"&#41;; <br>&#60;/PDM_IF&#62;<!--c2--></div><!--ec2-->
+
<source lang="html4strict">
 
+
<PDM_IF $args.id != 0>
 +
ImgBtnCreate("makechild", "Create Child",
 +
            "create_new('chg',0,0,0,'','INITFROM=make_child')",
 +
            true, 0,"Create a Child");
 +
</PDM_IF>
 +
</source>
  
 
'''For Issues:'''<br>
 
'''For Issues:'''<br>
Add the following code to iss_reliss.htmpl.
+
Add the following code to iss_reliss_tab.htmpl.
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;PDM_IF $args.id != 0&#62;<br>ImgBtnCreate&#40;"makechild", "Create Child", "create_new&#40;&#39;iss&#39;,0,0,0,&#39;&#39;,&#39;INITFROM=make_child&#39;&#41;", true, 0,"Create a Child"&#41;; <br>&#60;/PDM_IF&#62;<!--c2--></div><!--ec2--><br>
+
<source lang="html4strict">
 +
<PDM_IF $args.id != 0>
 +
ImgBtnCreate("makechild", "Create Child",
 +
            "create_new('iss',0,0,0,'','INITFROM=make_child')",
 +
            true, 0,"Create a Child");
 +
</PDM_IF>
 +
</source>
 +
 
 +
For r11.x and newer releases it is recommended that you edit your pages via the [[Web Screen Painter]]. For older releases you must edit the files directly.
 +
 
 +
=== Step 2. Create zchild_creation.htmpl file ===
 +
The next step is to create a zchild_creation.htmpl file where all the relationships will be maintained. Use the following code as a starting point. Modify as needed.
 +
 
 +
<source lang="html4strict">
 +
<FORM NAME="make_child">
 +
<!-- For all ticket types -->
 +
<INPUT TYPE=hidden NAME=SET.assignee VALUE="$args.assignee">
 +
<INPUT TYPE=hidden NAME=assignee_combo_name VALUE="$args.assignee.combo_name">
 +
<INPUT TYPE=hidden NAME=SET.category VALUE="$args.category">
 +
<INPUT TYPE=hidden NAME=KEY.category VALUE="$args.category.sym">
 +
<INPUT TYPE=hidden NAME=SET.description VALUE=<PDM_FMT ESC_STYLE=JS2>"$args.description(Child created from Parent $args.ref_num)"</PDM_FMT>>
 +
<INPUT TYPE=hidden NAME=SET.group VALUE="$args.group">
 +
<INPUT TYPE=hidden NAME=group_combo_name VALUE="$args.group.combo_name">
 +
<INPUT TYPE=hidden NAME=SET.priority VALUE="$args.priority">
 +
<INPUT TYPE=hidden NAME=SET.rootcause VALUE="$args.rootcause">
 +
<INPUT TYPE=hidden NAME=KEY.rootcause VALUE="$args.rootcause.sym">
 +
<INPUT TYPE=hidden NAME=SET.status VALUE="$args.status">
 +
<INPUT TYPE=hidden NAME=SET.summary VALUE=<PDM_FMT ESC_STYLE=JS2>"$args.summary"</PDM_FMT>>
 +
 
 +
<PDM_IF "$prop.form_name_2" == "chg">
 +
<!-- For Change Orders only -->
 +
<INPUT TYPE=hidden NAME=SET.organization VALUE="$args.organization">
 +
<INPUT TYPE=hidden NAME=SET.parent VALUE="$args.id">
 +
<INPUT TYPE=hidden NAME=KEY.parent VALUE="$args.chg_ref_num">
 +
<INPUT TYPE=hidden NAME=SET.requestor VALUE="$args.requestor">
 +
<INPUT TYPE=hidden NAME=requestor_combo_name VALUE="$args.requestor.combo_name">
 +
<PDM_ELSE>
 +
<!-- For everything BUT Change Orders -->
 +
<INPUT TYPE=hidden NAME=SET.parent VALUE="$args.persistent_id">
 +
<INPUT TYPE=hidden NAME=KEY.parent VALUE="$args.ref_num">
 +
</PDM_IF>
 +
 
 +
<PDM_IF "$prop.form_name_2" == "iss">
 +
<!-- For Issues only -->
 +
<INPUT TYPE=hidden NAME=SET.actions VALUE=<PDM_FMT ESC_STYLE=JS2>"$args.actions"</PDM_FMT>>
 +
<INPUT TYPE=hidden NAME=SET.flag1 VALUE="$args.flag1">
 +
<INPUT TYPE=hidden NAME=SET.flag2 VALUE="$args.flag2">
 +
<INPUT TYPE=hidden NAME=SET.flag3 VALUE="$args.flag3">
 +
<INPUT TYPE=hidden NAME=SET.flag4 VALUE="$args.flag4">
 +
<INPUT TYPE=hidden NAME=SET.flag5 VALUE="$args.flag5">
 +
<INPUT TYPE=hidden NAME=SET.flag6 VALUE="$args.flag6">
 +
<INPUT TYPE=hidden NAME=SET.person_contacting VALUE="$args.person_contacting">
 +
<INPUT TYPE=hidden NAME=SET.product VALUE="$args.product">
 +
<INPUT TYPE=hidden NAME=SET.reporting_method VALUE="$args.reporting_method">
 +
<INPUT TYPE=hidden NAME=SET.service_num VALUE="$args.service_num">
 +
<INPUT TYPE=hidden NAME=SET.type_of_contact VALUE="$args.type_of_contact">
 +
<INPUT TYPE=hidden NAME=SET.user1 VALUE=<PDM_FMT ESC_STYLE=JS2>"$args.user1"</PDM_FMT>>
 +
<INPUT TYPE=hidden NAME=SET.user2 VALUE=<PDM_FMT ESC_STYLE=JS2>"$args.user2"</PDM_FMT>>
 +
<INPUT TYPE=hidden NAME=SET.user3 VALUE=<PDM_FMT ESC_STYLE=JS2>"$args.user3"</PDM_FMT>>
 +
<PDM_ELSE>
 +
<!-- For everything BUT Issues -->
 +
<INPUT TYPE=hidden NAME=SET.rootcause VALUE="$args.rootcause">
 +
<INPUT TYPE=hidden NAME=SET.impact VALUE="$args.impact">
 +
</PDM_IF>
 +
 
 +
<PDM_IF "$prop.form_name_2" == "chg" || "$prop.form_name_2" == "iss">
 +
<!-- For Change Orders and Issues only -->
 +
<INPUT TYPE=hidden NAME=SET.actual_comp_date VALUE="$args.actual_comp_date">
 +
<INPUT TYPE=hidden NAME=SET.act_total_time VALUE="$args.act_total_time">
 +
<INPUT TYPE=hidden NAME=SET.backout_plan VALUE=<PDM_FMT ESC_STYLE=JS2>"$args.backout_plan"</PDM_FMT>>
 +
<INPUT TYPE=hidden NAME=SET.cost VALUE="$args.cost">
 +
<INPUT TYPE=hidden NAME=SET.effort VALUE=<PDM_FMT ESC_STYLE=JS2>"$args.effort"</PDM_FMT>>
 +
<INPUT TYPE=hidden NAME=SET.est_comp_date VALUE="$args.est_comp_date">
 +
<INPUT TYPE=hidden NAME=SET.est_cost VALUE="$args.est_cost">
 +
<INPUT TYPE=hidden NAME=SET.est_total_time VALUE="$args.est_total_time">
 +
<INPUT TYPE=hidden NAME=SET.justification VALUE=<PDM_FMT ESC_STYLE=JS2>"$args.justification"</PDM_FMT>>
 +
</PDM_IF>
 +
 
 +
<PDM_IF "$prop.form_name_2" == "cr" || "$prop.form_name_2" == "in" || "$prop.form_name_2" == "pr">
 +
<!-- For Requests, Incidents, and Problems only -->
 +
<INPUT TYPE=hidden NAME=SET.affected_resource VALUE="$args.affected_resource">
 +
<INPUT TYPE=hidden NAME=KEY.affected_resource VALUE="$args.affected_resource.COMMON_NAME">
 +
<INPUT TYPE=hidden NAME=SET.change VALUE="$args.change">
 +
<INPUT TYPE=hidden NAME=KEY.change VALUE="$args.change.chg_ref_num">
 +
<INPUT TYPE=hidden NAME=SET.charge_back_id VALUE="$args.charge_back_id">
 +
<INPUT TYPE=hidden NAME=SET.severity VALUE="$args.severity">
 +
<INPUT TYPE=hidden NAME=SET.urgency VALUE="$args.urgency">
 +
</PDM_IF>
 +
 
 +
<PDM_IF "$prop.form_name_2" == "in">
 +
<!-- For Incidents only -->
 +
<INPUT TYPE=hidden NAME=SET.problem VALUE="$args.problem">
 +
<INPUT TYPE=hidden NAME=KEY.problem VALUE="$args.problem.ref_num">
 +
</PDM_IF>
 +
 
 +
</FORM></source>
  
== Step 2. Create the form ==
+
=== Step 3. Modify Detail Forms ===
The next step is to add a "make_child" form to the main detail page. The detail pages are:
+
The next step is to add a reference to the zcreate_child.htmpl form. the following tables lists the forms to be edited.
*detail_cr.htmpl for Requests
+
*detail_in.htmpl for Incidents
+
*detail_pr.htmpl for Problems
+
*detail_chg.htmpl for Change Orders
+
*detail_iss.htmpl for Issues
+
  
The following code provides a few examples of setting name fields, searchable fields, drop-down lists, and free-text fields. Use the examples provided here or add your own. However, you ''must'' include the lines presented in red. Search the file you are editing for "frm002" and place the make_child form before it.
+
{| border="1" style="width:400px;"
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><font color="red">&#60;FORM NAME="make_child"&#62;<br>&#60;INPUT TYPE=hidden NAME=SET.parent VALUE="$args.persistent_id"&#62;<br>&#60;INPUT TYPE=hidden NAME=KEY.parent VALUE="$args.ref_num"</font>&#62;<br>&#60;INPUT TYPE=hidden NAME=SET.customer VALUE="$args.customer"&#62;<br>&#60;INPUT TYPE=hidden NAME=customer_combo_name VALUE="$args.customer.combo_name"&#62;<br>&#60;INPUT TYPE=hidden NAME=SET.category VALUE="$args.category"&#62;<br>&#60;INPUT TYPE=hidden NAME=KEY.category VALUE="$args.category.sym"&#62;<br>&#60;INPUT TYPE=hidden NAME=SET.priority VALUE="$args.priority"&#62;<br>&#60;INPUT TYPE=hidden NAME=SET.description VALUE=&#60;PDM_FMT ESC_STYLE=HTML&#62;"$args.description &#40;created as a child from $args.ref_num&#41;"&#60;/PDM_FMT&#62;&#62;<br><font color="red">&#60;/FORM&#62;</font><!--c2--></div><!--ec2-->
+
|-
 +
! Ticket Type
 +
! Detail Page File Name
 +
|-
 +
| Request
 +
| detail_cr.htmpl
 +
|-
 +
| Incident
 +
| detail_in.htmpl
 +
|-
 +
| Problem
 +
| detail_pr.htmpl
 +
|-
 +
| Change Order
 +
| detail_chg.htmpl
 +
|-
 +
| Issue
 +
| detail_iss.htmpl
 +
|-
 +
|}
  
<font color="red">''Note: For COs only, replace ref_num with chg_ref_num.''</font>
+
Search the file you are editing for "<nowiki><CENTER></nowiki>" and place the following line of code immediately before it.
 +
<source lang="html4strict">
 +
<PDM_INCLUDE FILE=zchild_creation.htmpl>
 +
</source>
  
== Step 3. Clear the web cache ==
+
=== Step 4. Clear the web cache ===
 
The final step is to clear Service Desk's cache. The methods vary depending on release.
 
The final step is to clear Service Desk's cache. The methods vary depending on release.
 
   
 
   
<font color="blue">'''For r11.x releases of Service Desk:'''</font><br>
+
''For r11 and newer releases'' publish your changes via the [[Web Screen Painter]]. The process of publishing automatically initiates a [[pdm_webcache]].
Publish your changes via the Web Screen Painter. The process of publishing automatically initiates a [[pdm_webcache]].
+
  
<font color="blue">'''For older releases:'''</font><br>
+
''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]].
Execute [[pdm_webcache]] from a command prompt on the Primary Server. There is no need to run this command on the Secondary Servers.
+

Latest revision as of 05:40, 24 November 2010

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 contains instructions for expediting the child creation process by using information from the parent ticket.

This customization is known to work in all currently supported releases of Service Desk.

Procedures

Step 1. Create the button

The first step is to add a "Create a Child" button to the Parent/Child tab.

For Requests, Incidents, and Problems:
Add the following code to cr_relreq_tab.htmpl for Requests, in_relreq_tab.htmpl for Incidents, or pr_relreq_tab.htmpl for Problems. <source lang="html4strict"> <PDM_IF $args.id != 0> ImgBtnCreate("makechild", "Create Child",

            "create_new('cr',0,0,0,'PRESET=type:$args.type','INITFROM=make_child')",
            true, 0,"Create a Child");

</PDM_IF> </source>

For Change Orders:
Add the following code to chg_relchg.htmpl. <source lang="html4strict"> <PDM_IF $args.id != 0> ImgBtnCreate("makechild", "Create Child",

            "create_new('chg',0,0,0,,'INITFROM=make_child')",
            true, 0,"Create a Child");

</PDM_IF> </source>

For Issues:
Add the following code to iss_reliss_tab.htmpl. <source lang="html4strict"> <PDM_IF $args.id != 0> ImgBtnCreate("makechild", "Create Child",

            "create_new('iss',0,0,0,,'INITFROM=make_child')",
            true, 0,"Create a Child");

</PDM_IF> </source>

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

Step 2. Create zchild_creation.htmpl file

The next step is to create a zchild_creation.htmpl file where all the relationships will be maintained. Use the following code as a starting point. Modify as needed.

<source lang="html4strict"> <FORM NAME="make_child"> <INPUT TYPE=hidden NAME=SET.assignee VALUE="$args.assignee"> <INPUT TYPE=hidden NAME=assignee_combo_name VALUE="$args.assignee.combo_name"> <INPUT TYPE=hidden NAME=SET.category VALUE="$args.category"> <INPUT TYPE=hidden NAME=KEY.category VALUE="$args.category.sym"> <INPUT TYPE=hidden NAME=SET.description VALUE=<PDM_FMT ESC_STYLE=JS2>"$args.description(Child created from Parent $args.ref_num)"</PDM_FMT>> <INPUT TYPE=hidden NAME=SET.group VALUE="$args.group"> <INPUT TYPE=hidden NAME=group_combo_name VALUE="$args.group.combo_name"> <INPUT TYPE=hidden NAME=SET.priority VALUE="$args.priority"> <INPUT TYPE=hidden NAME=SET.rootcause VALUE="$args.rootcause"> <INPUT TYPE=hidden NAME=KEY.rootcause VALUE="$args.rootcause.sym"> <INPUT TYPE=hidden NAME=SET.status VALUE="$args.status"> <INPUT TYPE=hidden NAME=SET.summary VALUE=<PDM_FMT ESC_STYLE=JS2>"$args.summary"</PDM_FMT>>

<PDM_IF "$prop.form_name_2" == "chg"> <INPUT TYPE=hidden NAME=SET.organization VALUE="$args.organization"> <INPUT TYPE=hidden NAME=SET.parent VALUE="$args.id"> <INPUT TYPE=hidden NAME=KEY.parent VALUE="$args.chg_ref_num"> <INPUT TYPE=hidden NAME=SET.requestor VALUE="$args.requestor"> <INPUT TYPE=hidden NAME=requestor_combo_name VALUE="$args.requestor.combo_name"> <PDM_ELSE> <INPUT TYPE=hidden NAME=SET.parent VALUE="$args.persistent_id"> <INPUT TYPE=hidden NAME=KEY.parent VALUE="$args.ref_num"> </PDM_IF>

<PDM_IF "$prop.form_name_2" == "iss"> <INPUT TYPE=hidden NAME=SET.actions VALUE=<PDM_FMT ESC_STYLE=JS2>"$args.actions"</PDM_FMT>> <INPUT TYPE=hidden NAME=SET.flag1 VALUE="$args.flag1"> <INPUT TYPE=hidden NAME=SET.flag2 VALUE="$args.flag2"> <INPUT TYPE=hidden NAME=SET.flag3 VALUE="$args.flag3"> <INPUT TYPE=hidden NAME=SET.flag4 VALUE="$args.flag4"> <INPUT TYPE=hidden NAME=SET.flag5 VALUE="$args.flag5"> <INPUT TYPE=hidden NAME=SET.flag6 VALUE="$args.flag6"> <INPUT TYPE=hidden NAME=SET.person_contacting VALUE="$args.person_contacting"> <INPUT TYPE=hidden NAME=SET.product VALUE="$args.product"> <INPUT TYPE=hidden NAME=SET.reporting_method VALUE="$args.reporting_method"> <INPUT TYPE=hidden NAME=SET.service_num VALUE="$args.service_num"> <INPUT TYPE=hidden NAME=SET.type_of_contact VALUE="$args.type_of_contact"> <INPUT TYPE=hidden NAME=SET.user1 VALUE=<PDM_FMT ESC_STYLE=JS2>"$args.user1"</PDM_FMT>> <INPUT TYPE=hidden NAME=SET.user2 VALUE=<PDM_FMT ESC_STYLE=JS2>"$args.user2"</PDM_FMT>> <INPUT TYPE=hidden NAME=SET.user3 VALUE=<PDM_FMT ESC_STYLE=JS2>"$args.user3"</PDM_FMT>> <PDM_ELSE> <INPUT TYPE=hidden NAME=SET.rootcause VALUE="$args.rootcause"> <INPUT TYPE=hidden NAME=SET.impact VALUE="$args.impact"> </PDM_IF>

<PDM_IF "$prop.form_name_2" == "chg" || "$prop.form_name_2" == "iss"> <INPUT TYPE=hidden NAME=SET.actual_comp_date VALUE="$args.actual_comp_date"> <INPUT TYPE=hidden NAME=SET.act_total_time VALUE="$args.act_total_time"> <INPUT TYPE=hidden NAME=SET.backout_plan VALUE=<PDM_FMT ESC_STYLE=JS2>"$args.backout_plan"</PDM_FMT>> <INPUT TYPE=hidden NAME=SET.cost VALUE="$args.cost"> <INPUT TYPE=hidden NAME=SET.effort VALUE=<PDM_FMT ESC_STYLE=JS2>"$args.effort"</PDM_FMT>> <INPUT TYPE=hidden NAME=SET.est_comp_date VALUE="$args.est_comp_date"> <INPUT TYPE=hidden NAME=SET.est_cost VALUE="$args.est_cost"> <INPUT TYPE=hidden NAME=SET.est_total_time VALUE="$args.est_total_time"> <INPUT TYPE=hidden NAME=SET.justification VALUE=<PDM_FMT ESC_STYLE=JS2>"$args.justification"</PDM_FMT>> </PDM_IF>

<PDM_IF "$prop.form_name_2" == "cr" || "$prop.form_name_2" == "in" || "$prop.form_name_2" == "pr"> <INPUT TYPE=hidden NAME=SET.affected_resource VALUE="$args.affected_resource"> <INPUT TYPE=hidden NAME=KEY.affected_resource VALUE="$args.affected_resource.COMMON_NAME"> <INPUT TYPE=hidden NAME=SET.change VALUE="$args.change"> <INPUT TYPE=hidden NAME=KEY.change VALUE="$args.change.chg_ref_num"> <INPUT TYPE=hidden NAME=SET.charge_back_id VALUE="$args.charge_back_id"> <INPUT TYPE=hidden NAME=SET.severity VALUE="$args.severity"> <INPUT TYPE=hidden NAME=SET.urgency VALUE="$args.urgency"> </PDM_IF>

<PDM_IF "$prop.form_name_2" == "in"> <INPUT TYPE=hidden NAME=SET.problem VALUE="$args.problem"> <INPUT TYPE=hidden NAME=KEY.problem VALUE="$args.problem.ref_num"> </PDM_IF>

</FORM></source>

Step 3. Modify Detail Forms

The next step is to add a reference to the zcreate_child.htmpl form. the following tables lists the forms to be edited.

Ticket Type Detail Page File Name
Request detail_cr.htmpl
Incident detail_in.htmpl
Problem detail_pr.htmpl
Change Order detail_chg.htmpl
Issue detail_iss.htmpl

Search the file you are editing for "<CENTER>" and place the following line of code immediately before it. <source lang="html4strict"> <PDM_INCLUDE FILE=zchild_creation.htmpl> </source>

Step 4. Clear the web cache

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

For r11 and newer 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.