Difference between revisions of "Relate Issues And Change Orders"

From SDU
Jump to: navigation, search
(added some formatting and code tags. Made the images resizable.)
Line 10: Line 10:
 
# Verify if these objects have been created properly by giving the commands
 
# Verify if these objects have been created properly by giving the commands
  
<tt>Bop_sinfo –da chg </tt>
+
::<tt>Bop_sinfo –da chg
  
<tt>Bop_sinfo –da iss</tt>
+
::Bop_sinfo –da iss</tt>
  
 
We can check the same information in the wsp_schema table from the MDB.
 
We can check the same information in the wsp_schema table from the MDB.
 
Explanation:
 
Explanation:
  
* ''Impacted_iss'' is the Lrel object to the Issue Table
+
* ''Impacted_iss'' is the Lrel object to the Issue (iss) Table with the Changes related to the Issue.
* ''Impacted_chg'' the Lrel object to the chg Table
+
* ''Impacted_chg'' the Lrel object to the Change (chg) Table with the Issues related to the Change.
  
  
== Create a customised htmpl tab page called “Chg_iss_tab.htmpl” ==
+
== Create a customised htmpl tab page called “chg_iss_tab.htmpl” ==
  
 
<source lang="html4strict">
 
<source lang="html4strict">
Line 83: Line 83:
 
</source>
 
</source>
 
== Modifications to 'detail_chg.htmpl' ==
 
== Modifications to 'detail_chg.htmpl' ==
Create a button to attach issues
+
Create a button to attach Issues
 
<source lang="JavaScript">
 
<source lang="JavaScript">
 
ImgBtnCreate("UPDATE_LREL", "Attach Issues", "update_lrel('chg', '$args.persistent_id', 'iss', 'impacted_chg',  'Issues', msgtext(211), '')", true, 0);
 
ImgBtnCreate("UPDATE_LREL", "Attach Issues", "update_lrel('chg', '$args.persistent_id', 'iss', 'impacted_chg',  'Issues', msgtext(211), '')", true, 0);
 
</source>
 
</source>
  
Include a Tab called “Related Issues”
+
Include a tab called “Related Issues” in the Change page (detail_chg.htmpl):
 
<source lang="JavaScript">
 
<source lang="JavaScript">
 
<PDM_TAB ID=rel FILE="chg_iss_tab.htmpl" NAME="Related Issues">
 
<PDM_TAB ID=rel FILE="chg_iss_tab.htmpl" NAME="Related Issues">
Line 94: Line 94:
  
 
== Modifications to 'list_iss.htmpl' ==
 
== Modifications to 'list_iss.htmpl' ==
Add the Below line  
+
Add the below line  
 
<source lang="JavaScript">
 
<source lang="JavaScript">
 
<PDM_IF "$args.KEEP.ForLrel" == "1">
 
<PDM_IF "$args.KEEP.ForLrel" == "1">
Line 109: Line 109:
 
Explanation:
 
Explanation:
  
This is added so that when we search for the Issues to be attached to the current Change Request the search page will not go to the default list page but go to the update_lrel_iss page.
+
This is added so that when we search for the Issues to be attached to the current Change Request the search page will not go to the default list page but go to the ''update_lrel_iss.htmpl'' page.
  
  
  
'''Note: Follow the above 4 points with the object Iss(Issue) also'''
+
'''Note: Follow the above 3 points (1.2 through 1.4) with the object Iss (Issue) also''':
 +
 
 +
# Create a new ''iss_chg_tab.htmpl'' using the same code, but change Iss to Chg and vice-versa. Make sure you use 'impacted_iss' instead of 'impacted_chg' as the source of the list.
 +
# Create a button to attach Changes and include the 'Related Changes' tab (iss_chg_tab.htmpl) to the detail_iss.htmpl page, using the same code, but also change Chg to Iss and the other way around.
 +
# Modify 'list_chg.htmpl' and add the needed line (see 1.4), substituting ''update_lrel_iss.htmpl'' with ''update_lrel_chg.htmpl''.
  
 
= How to use the Customization =
 
= How to use the Customization =

Revision as of 17:26, 25 May 2009

Creating a LREL between Changes and Issues

Adding the Cutomization

Create a LREL relation between Issue and Change Order

  1. Write a majic file called “lrel1.maj”, in site\mods\majic folder with the following contents:

<source lang="text" >LREL lrel1 iss impacted_iss <> chg impacted_chg;</source>

  1. Recycle the service
  2. Verify if these objects have been created properly by giving the commands
Bop_sinfo –da chg
Bop_sinfo –da iss

We can check the same information in the wsp_schema table from the MDB. Explanation:

  • Impacted_iss is the Lrel object to the Issue (iss) Table with the Changes related to the Issue.
  • Impacted_chg the Lrel object to the Change (chg) Table with the Issues related to the Change.


Create a customised htmpl tab page called “chg_iss_tab.htmpl”

<source lang="html4strict"> <html lang="en"><HEAD> <PDM_PRAGMA RELEASE=110> <PDM_WSP mode=edit factory=chg preview="NBTAB=chg_iss_tab"> <PDM_INCLUDE FILE=styles.htmpl> <PDM_INCLUDE FILE=std_head.htmpl busy=no> <SCRIPT LANGUAGE="JavaScript" SRC="$CAisd/scripts/sitemods.js"></SCRIPT> </HEAD> <BODY> <PDM_INCLUDE FILE=std_body.htmpl filename=""> <PDM_FORM NAME="frmDTLRO"> <SCRIPT LANGUAGE="JavaScript"> tab_banner("Related Issues List");

docWriteln(""); docWriteln(""); docWriteln(""); docWriteln(""); docWriteln(""); docWriteln(""); <PDM_IF $args.impacted_chg.length == 0 > <PDM_MACRO NAME=dtlStartRow> docWriteln(""); <PDM_MACRO NAME=dtlEndTable> <PDM_ELSE> var counter=0; <PDM_LIST SOURCE=args.impacted_chg> var sClass; if(counter%2) sClass = "results1"; else sClass = "results0"; counter++; var strHTML=""; docWriteln(strHTML); docWriteln(""); docWriteln(''); docWriteln(''); docWriteln(""); </PDM_LIST> </PDM_IF> docWriteln("
Ref#StatusDescription
");

docWriteln("No Issue Attached");

docWriteln("
");

var start_a_tag = "<A" + detailNextID(true) +

          " HREF=\"javascript:showDetailWithPersid('" +
          '<PDM_FMT ESC_STYLE=C>$args.impacted_chg.persistent_id</PDM_FMT>' +
          "')\">";

var ecsaped_name=<PDM_FMT ESC_STYLE=C>"$args.impacted_chg.ref_num"</PDM_FMT>; end_a_tag="</A>"; docWriteln(start_a_tag+ecsaped_name+end_a_tag);

docWriteln("
<PDM_FMT ESC_STYLE=C PAD=NO>$args.impacted_chg.status.sym</PDM_FMT><PDM_FMT ESC_STYLE=C PAD=NO>$args.impacted_chg.description</PDM_FMT>
");

</SCRIPT> </PDM_FORM> </BODY> </HTML> <PDM_IF 0> </source>

Modifications to 'detail_chg.htmpl'

Create a button to attach Issues <source lang="JavaScript"> ImgBtnCreate("UPDATE_LREL", "Attach Issues", "update_lrel('chg', '$args.persistent_id', 'iss', 'impacted_chg', 'Issues', msgtext(211), )", true, 0); </source>

Include a tab called “Related Issues” in the Change page (detail_chg.htmpl): <source lang="JavaScript"> <PDM_TAB ID=rel FILE="chg_iss_tab.htmpl" NAME="Related Issues"> </source>

Modifications to 'list_iss.htmpl'

Add the below line <source lang="JavaScript"> <PDM_IF "$args.KEEP.ForLrel" == "1"> document.writeln('<INPUT TYPE=hidden NAME=HTMPL VALUE=update_lrel_iss.htmpl>'); </PDM_IF> </source> After the line <source lang="JavaScript"> <PDM_IF "$args.KEEP.Forchild" == "1"> document.writeln('<INPUT TYPE=hidden NAME=HTMPL VALUE=update_lrel_iss.htmpl>'); </PDM_IF> </source>

Explanation:

This is added so that when we search for the Issues to be attached to the current Change Request the search page will not go to the default list page but go to the update_lrel_iss.htmpl page.


Note: Follow the above 3 points (1.2 through 1.4) with the object Iss (Issue) also:

  1. Create a new iss_chg_tab.htmpl using the same code, but change Iss to Chg and vice-versa. Make sure you use 'impacted_iss' instead of 'impacted_chg' as the source of the list.
  2. Create a button to attach Changes and include the 'Related Changes' tab (iss_chg_tab.htmpl) to the detail_iss.htmpl page, using the same code, but also change Chg to Iss and the other way around.
  3. Modify 'list_chg.htmpl' and add the needed line (see 1.4), substituting update_lrel_iss.htmpl with update_lrel_chg.htmpl.

How to use the Customization

After logging in the Service Desk web interface, open a Change Order:

Detail chg.jpg

When you click on 'Attach Issues' the search filter for Issues will be shown:

Attach Issues.jpg

Click Search and you'll get a list of Issues

Search.jpg

Add the Tickets that needs to be attached and then see the tab “Issues” to find all the attached Issues to the current Change Order

Final.jpg