Difference between revisions of "Simplified Child Creation"

From SDU
Jump to: navigation, search
Line 9: Line 9:
 
'''For [[Request|Requests]], [[Incident|Incidents]], and [[Problem|Problems]]:'''<br>
 
'''For [[Request|Requests]], [[Incident|Incidents]], and [[Problem|Problems]]:'''<br>
 
Add the following code to cr_relreq.htmpl for [[Request|Requests]], in_relreq.htmpl for [[Incident|Incidents]], or pr_relreq.htmpl for [[Problem|Problems]].
 
Add the following code to cr_relreq.htmpl for [[Request|Requests]], in_relreq.htmpl for [[Incident|Incidents]], or pr_relreq.htmpl for [[Problem|Problems]].
<!--html--><div class='htmltop'>HTML</div><div class='htmlmain'><!--html1--><<span style='color:blue'>PDM_IF $args.id != 0</span>> <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> <<span style='color:blue'>/PDM_IF</span>><!--html2--></div><!--html3-->
+
<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 Order|Change Orders]]:'''<br>
 
'''For [[Change Order|Change Orders]]:'''<br>
 
Add the following code to chg_relchg.htmpl.
 
Add the following code to chg_relchg.htmpl.
<!--html--><div class='htmltop'>HTML</div><div class='htmlmain'><!--html1--><<span style='color:blue'>PDM_IF $args.id != 0</span>> <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> <<span style='color:blue'>/PDM_IF</span>><!--html2--></div><!--html3-->
+
<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 [[Issue|Issues]]:'''<br>
 
'''For [[Issue|Issues]]:'''<br>
 
Add the following code to iss_reliss.htmpl.
 
Add the following code to iss_reliss.htmpl.
<!--html--><div class='htmltop'>HTML</div><div class='htmlmain'><!--html1--><<span style='color:blue'>PDM_IF $args.id != 0</span>> <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> <<span style='color:blue'>/PDM_IF</span>><!--html2--></div><!--html3-->
+
<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 releases it is recommended that you edit your pages via the [[Web Screen Painter]]. For older releases you must edit the files directly.<br>
 
For r11.x releases it is recommended that you edit your pages via the [[Web Screen Painter]]. For older releases you must edit the files directly.<br>
Line 50: Line 63:
  
 
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. Search the file you are editing for "frm002" and place the make_child form before it.  
 
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. Search the file you are editing for "frm002" and place the make_child form before it.  
<!--html--><div class='htmltop'>HTML</div><div class='htmlmain'><!--html1--><<span style='color:blue'>FORM NAME</span>="<span style='color:orange'>make_child</span>"> <br> <<span style='color:blue'>INPUT TYPE=hidden NAME=SET.parent VALUE</span>="<span style='color:orange'>$args.persistent_id</span>"> <br> <<span style='color:blue'>INPUT TYPE=hidden NAME=KEY.parent VALUE</span>="<span style='color:orange'>$args.ref_num</span>"> <br> <<span style='color:blue'>INPUT TYPE=hidden NAME=SET.customer VALUE</span>="<span style='color:orange'>$args.customer</span>"> <br> <<span style='color:blue'>INPUT TYPE=hidden NAME=customer_combo_name VALUE</span>="<span style='color:orange'>$args.customer.combo_name</span>"> <br> <<span style='color:blue'>INPUT TYPE=hidden NAME=SET.category VALUE</span>="<span style='color:orange'>$args.category</span>"> <br> <<span style='color:blue'>INPUT TYPE=hidden NAME=KEY.category VALUE</span>="<span style='color:orange'>$args.category.sym</span>"> <br> <<span style='color:blue'>INPUT TYPE=hidden NAME=SET.priority VALUE</span>="<span style='color:orange'>$args.priority</span>"> <br> <<span style='color:blue'>INPUT TYPE=hidden NAME=SET.description VALUE</span>=<<span style='color:blue'>PDM_FMT ESC_STYLE=HTML</span>>"$args.description &#40;created as a child from $args.ref_num&#41;"<<span style='color:blue'>/PDM_FMT</span>>> <br> <<span style='color:blue'>/FORM</span>><!--html2--></div><!--html3-->
+
<source lang="html4strict">
 +
<FORM NAME="make_child">
 +
<INPUT TYPE=hidden NAME=SET.parent VALUE="$args.persistent_id">
 +
<INPUT TYPE=hidden NAME=KEY.parent VALUE="$args.ref_num">
 +
<INPUT TYPE=hidden NAME=SET.customer VALUE="$args.customer">
 +
<INPUT TYPE=hidden NAME=customer_combo_name VALUE="$args.customer.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.priority VALUE="$args.priority">
 +
<INPUT TYPE=hidden NAME=SET.description VALUE=<PDM_FMT ESC_STYLE=HTML>"$args.description (created as a child from $args.ref_num)"</PDM_FMT>>
 +
</FORM>
 +
</source>
  
 
<font color="red">''Note: For COs only, replace all instances of $args.ref_num with $args.chg_ref_num.''</font>
 
<font color="red">''Note: For COs only, replace all instances of $args.ref_num with $args.chg_ref_num.''</font>

Revision as of 18:06, 24 January 2008

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.

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.htmpl for Requests, in_relreq.htmpl for Incidents, or pr_relreq.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.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 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 the form

The next step is to add a "make_child" form to the main detail page.

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


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. Search the file you are editing for "frm002" and place the make_child form before it. <source lang="html4strict"> <FORM NAME="make_child"> <INPUT TYPE=hidden NAME=SET.parent VALUE="$args.persistent_id"> <INPUT TYPE=hidden NAME=KEY.parent VALUE="$args.ref_num"> <INPUT TYPE=hidden NAME=SET.customer VALUE="$args.customer"> <INPUT TYPE=hidden NAME=customer_combo_name VALUE="$args.customer.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.priority VALUE="$args.priority"> <INPUT TYPE=hidden NAME=SET.description VALUE=<PDM_FMT ESC_STYLE=HTML>"$args.description (created as a child from $args.ref_num)"</PDM_FMT>> </FORM> </source>

Note: For COs only, replace all instances of $args.ref_num with $args.chg_ref_num.

Step 3. Clear the web cache

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

For r11.x releases of Service Desk:
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.