CA Service Management

 View Only
  • 1.  Attachment in change template

    Posted Jun 13, 2017 11:00 AM

    Hi,

     

    I need the ability in service desk for an attachment to a Change template to be carried over to a new change when someone uses the template. How to achieve this. 

     

    Regards,

    Amala



  • 2.  Re: Attachment in change template

    Posted Jun 13, 2017 01:37 PM

    Hi Amala,

    The product does not currently allow for this to occur - this would be an enhancement which you can post as in idea here in the community.  Folks can then vote for it, and product management can review it for possible inclusion in future versions.

    Thanks,

    Jon I.



  • 3.  Re: Attachment in change template

    Posted Jun 14, 2017 05:54 AM

    Hi,

     

    Is there any alternative way or approach to accomplish the task?

     

    Thanks,

    Amala.



  • 4.  Re: Attachment in change template
    Best Answer

    Posted Jun 14, 2017 12:26 PM

    Hi Balling,

     

    cdtj published a solution to this.  Download his z_lrel_copy.spl file and place it in nx_root/site/mods/magic.  Next copy tmplcopy_site.spl from nx_root\bopcfg\magic to nx_root\site\mods\magic and open it up in a text editor.  Make the following changes to the chg::make_from_template_site and chg::copy_chg_site functions. Note the addition of the z_lrel_copy lines.  Finally, restart services and test.  We've been using this customization for a few months without issue.

     

    ////////////////////////////////////////////////////////////////////////
    // Method:      chg::make_from_template_site()
    //
    // Description: Exit point for make from template processing
    //
    // Input
    //   template     argv[0]
    //   new chg     argv[1]
    //   new chgalg     argv[2]
    //   gl          argv[3]
    //
    // Return
    //   none
    ////////////////////////////////////////////////////////////////////////
    chg::make_from_template_site(...) {

         object tmpl, new, chgalg, gl;
         tmpl=argv[0];
         new=argv[1];
         chgalg=argv[2];
         gl=argv[3];

            //logf(SIGNIFICANT, "chg::make_from_template_site template %s new %s chgalg %s gl %s",
         //     tmpl.chg_ref_num, new.chg_ref_num, chgalg.persistent_id, gl);

            //Copy attachments over from change order template
         z_lrel_copy(tmpl, new, "lrel_attachments_changes", "chg", "attmnt");

        
            return;
    }

    ////////////////////////////////////////////////////////////////////////
    // Method:      chg::copy_chg_site()
    //
    // Description: Exit point for copy processing
    //
    // Input
    //   old chg     argv[0]
    //   new chg     argv[1]
    //   new chgalg     argv[2]
    //   gl          argv[3]
    //
    // Return
    //   none
    ////////////////////////////////////////////////////////////////////////
    chg::copy_chg_site(...) {

         object old, new, chgalg, gl;
         old=argv[0];
         new=argv[1];
         chgalg=argv[2];
         gl=argv[3];

         //logf(SIGNIFICANT, "chg::copy_chg_site old %s new %s chgalg %s gl %s",
         //     old.chg_ref_num, new.chg_ref_num, chgalg.persistent_id, gl);

            //Copy attachments over from source change order
         z_lrel_copy(old, new, "lrel_attachments_changes", "chg", "attmnt");

        
         return;
    }


  • 5.  Re: Attachment in change template

    Posted Jun 22, 2017 05:19 AM

    Given code works well. we are able to achieve the task.

    Thanks for you support.