CA Service Management

 View Only
  • 1.  Create Change Order From Issue

    Posted Jan 29, 2016 11:14 AM

    I want to add "create change order" button to detail_iss.htmpl form. This button is exist in the detail_in form with this code:

    <PDM_MACRO name=button caption="Create Change Order[!ea]" func="detailSave('NEW_CHANGE')" hotkey_name="Create Change Order[!ea]" id=btnchg>

    If i add this code to issue form doesnt work. I think modify detailSave function. How to do this?



  • 2.  Re: Create Change Order From Issue

    Posted Jan 30, 2016 10:56 AM

    Hi / Merhaba Levent,

     

    We also needed to this. With additional improvements(cutomizations), we made this need.

     

    If you want to relate change to issue, you add customize field on "chg" and "issue" factory/table

    1. Firstly we added following field on WSP(web screen painter)

    wsp.mods file view;

    ////////////////////////////////////////////////////////////////////////

    // Factory:   iss

    ////////////////////////////////////////////////////////////////////////

    OBJECT iss {

      ATTRIBUTES Issue {

         zchg SREL chg // Related Change Order

     

    ////////////////////////////////////////////////////////////////////////
    // Factory:   chg
    ////////////////////////////////////////////////////////////////////////

    OBJECT chg {
      ATTRIBUTES Change_Request {

         zfrom_iss SREL iss;

         ziss_list BREL iss zchg DYNAMIC { DOMSET iss_list ; } ;

     

    2. on detail_iss.htmpl, you type the following codes for button:

     

    <PDM_IF "$args.zchg" == "">
       if ( cfgUserAuth > 1 )

          ImgBtnCreate("btnchg", "Create_Change_Order[!ea]", "create_new('chg',0,0,0, 'INITFROM=frm003', 'PRESET=zfrom_iss:$args.persistent_id')", true, 0);//Add By CA Admin 10/11/2011
    </PDM_IF>

     

    if you show the change number on issue you type the following code:

     

         <PDM_MACRO name=dtlLookup hdr="Change" attr=zchg>

     

    you type the following codes for preset fields of change order from issue field

     

    <FORM NAME="frm003">
    <INPUT TYPE=hidden NAME=SET.affected_contact VALUE="$args.requestor">
    <INPUT TYPE=hidden NAME=affected_contact_combo_name VALUE="$args.requestor.combo_name">
    <INPUT TYPE=hidden NAME=SET.requestor VALUE="$cst.id">
    <INPUT TYPE=hidden NAME=requestor_combo_name VALUE="$cst.combo_name">
    <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.zseverity VALUE="$args.zseverity">
    <INPUT TYPE=hidden NAME=SET.zDK VALUE="400007">

    </FORM>

     

    3. on detail_chg.htmpl you type the following codes adding "zfrom_iss" field.

     

    <PDM_MACRO name=dtlLookup hdr="Issue" attr="zfrom_iss">

    this field for, if you related to change order from issue

     

    you type the following codes in Notebook(tabs) for releated issue list showing on change order

     

    <PDM_IF "$args.id" == 0> //this is from new create change order "Add Issue" button not showing on issue list

    <PDM_MACRO name=tab title="Releated Issues" height=300 id=rel src="OP=SEARCH+FACTORY=iss+QBE.EQ.zchg.id=$args.id+QBE.EQ.delete_flag=0+KEEP.ALWAYS_LIST_ISS=1+KEEP.CHG_ID=$args.id+KEEP.chgRefNum=$args.chg_ref_num+KEEP.UPD_LIST=ziss_list+KEEP.UPD_ATTR=zchg">

    <PDM_ELSE>

    <PDM_MACRO name=tab title="Releated Issues" height=300 id=rel src="OP=SEARCH+FACTORY=iss+QBE.EQ.zchg.id=$args.id+QBE.EQ.delete_flag=0+KEEP.ALWAYS_LIST_ISS=1+KEEP.forChangeIssList=1+KEEP.CHG_ID=$args.id+KEEP.chgRefNum=$args.chg_ref_num+KEEP.UPD_LIST=ziss_list+KEEP.UPD_ATTR=zchg">

    </PDM_IF>

     

    4. on list_iss.htmpl you type the following codes for calling from change order detail screen

     

    //if issue list calling from change

    <PDM_IF "$args.KEEP.forChangeIssList" == "1">
    var argChgRefNum = "$args.KEEP.chgRefNum";
        var chgRefNumStr = "Change $args.KEEP.chgRefNum";
    var cfgExtraButton=new Array("Add Issue", "update_iss()", true);

    //this function adding issue from changer order issue

    function update_iss()
    {
      update_child("chg", "chg:"+"$args.KEEP.CHG_ID", "$args.KEEP.UPD_LIST", "iss", "$args.KEEP.UPD_ATTR", "Issues", chgRefNumStr);
    }                                     

    </PDM_IF>

     

    --------------------------------------------

    If you can't implemented this customization I send to our custom files to your e-mail address

     

    Best regards,

     

    Türker