Difference between revisions of "Simplified Child Creation"

From SDU
Jump to: navigation, search
(Step 2. Create the form)
(Step 2. Create the form)
Line 27: Line 27:
 
*detail_iss.htmpl for Issues
 
*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 or add your own... just be sure to include the two lines pertaining to ''parent''.
+
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... but you ''must'' include the lines presented in red. Search the file you are editing for <FORM NAME="frm002"> and place the make_child form before it.
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->&#60;FORM NAME="make_child"&#62;<br><font color="red">&#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>&#60;/FORM&#62;<!--c2--></div><!--ec2-->
+
<!--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-->
  
<font color="red">''Note: For COs, replace ref_num with chg_ref_num.''</font>
+
<font color="red">''Note: For COs only, replace ref_num with chg_ref_num.''</font>
  
 
== Step 3. Clear the web cache ==
 
== Step 3. Clear the web cache ==

Revision as of 22:29, 12 January 2008

This article contains instructions for expediting the child creation process by using information from the parent ticket.

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.

CODE
<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>


For Change Orders:
Add the following code to chg_relchg.htmpl.

CODE
<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>


For Issues:
Add the following code to iss_reliss.htmpl.

CODE
<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>


Step 2. Create the form

The next step is to add a "make_child" form on the main detail page of the ticket type.

  • 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... but you must include the lines presented in red. Search the file you are editing for <FORM NAME="frm002"> and place the make_child form before it.

CODE
<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>

Note: For COs only, replace ref_num with chg_ref_num.

Step 3. Clear the web cache

For r11.x releases of Service Desk:
Publish your changes via the Web Screen Painter.

For older releases:
Execute a pdm_webcache.