SDU
Personal tools

Relate Issues And Change Orders

From SDU

Jump to: navigation, search
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.

Creating a LREL between Changes and Issues

Contents

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:
LREL lrel1 iss impacted_iss <> chg impacted_chg;
  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”

<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("<TABLE ID=tbl101 CLASS=tab summary='Issue List Notebook Tab row " + (_dtl.rowNum + 1) + "'>");
docWriteln("<TR>");
docWriteln("<th scope=col ALIGN=LEFT class=results>Ref#</TH>");
docWriteln("<th scope=col ALIGN=LEFT class=results>Status</TH>");
docWriteln("<th scope=col ALIGN=LEFT class=results>Description</TH>");
docWriteln("</TR>");
<PDM_IF $args.impacted_chg.length == 0 >
<PDM_MACRO NAME=dtlStartRow>    
docWriteln("<TD ALIGN=middle class=detailro>");  
docWriteln("No Issue Attached");
docWriteln("</TD>");
<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="<TR class=" + sClass +  ">";
 
docWriteln(strHTML); 
 
docWriteln("<TD VALIGN=TOP class=detailroTab>");
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("</TD>");
docWriteln('<TD VALIGN=TOP class=detailroTab><PDM_FMT ESC_STYLE=C PAD=NO>$args.impacted_chg.status.sym</PDM_FMT></TD>');
docWriteln('<TD VALIGN=TOP class=detailroTab><PDM_FMT ESC_STYLE=C PAD=NO>$args.impacted_chg.description</PDM_FMT></TD>');
docWriteln("</TR>");
</PDM_LIST>
</PDM_IF>
docWriteln("</TABLE>");
</SCRIPT>
</PDM_FORM>
</BODY>
</HTML>
<PDM_IF 0>

Modifications to 'detail_chg.htmpl'

Create a button to attach Issues

ImgBtnCreate("UPDATE_LREL", "Attach Issues", "update_lrel('chg', '$args.persistent_id', 'iss', 'impacted_chg',  'Issues', msgtext(211), '')", true, 0);

Include a tab called “Related Issues” in the Change page (detail_chg.htmpl):

<PDM_TAB ID=rel FILE="chg_iss_tab.htmpl" NAME="Related Issues">

Modifications to 'list_iss.htmpl'

Add the below line

<PDM_IF "$args.KEEP.ForLrel" == "1">
document.writeln('<INPUT TYPE=hidden NAME=HTMPL VALUE=update_lrel_iss.htmpl>');
</PDM_IF>

After the line

<PDM_IF "$args.KEEP.Forchild" == "1">
document.writeln('<INPUT TYPE=hidden NAME=HTMPL VALUE=update_lrel_iss.htmpl>');
</PDM_IF>

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:

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

Click Search and you'll get a list of Issues

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

This page was last modified 10:31, 26 May 2009.  This page has been accessed 569 times.  Content is available under Attribution-Noncommercial-Share Alike 3.0 UnportedDisclaimers