CA Service Management

  • 1.  Remove values from Copy

    Posted Apr 28, 2016 05:29 PM

    Hi

     

    I want that some fields are not copied when I copy a new change order. Does anyone know when I should change that in 14.1 pages?



  • 2.  Re: Remove values from Copy
    Best Answer

    Posted Apr 28, 2016 11:55 PM

    Hi,

    you can modify tmplcopy_site.spl file in this way:

     

    chg::copy_chg_site(...) {
      object old, new, chgalg, gl;
      old = argv[0];
      new = argv[1];
      chgalg = argv[2];
      gl = argv[3];
      // wiping description
      send_wait(0, new, "call_attr", "description", "set_val", "");
      return;
    }
    

     

    You can set empty string, 0 or NULL to decided attribute depending on it's type.

     

    Regards,

    cdtj



  • 3.  Re: Remove values from Copy

    Posted Apr 29, 2016 10:33 AM

    So you would change line number 8?



  • 4.  Re: Remove values from Copy

    Posted Apr 29, 2016 05:16 PM

    or line 8 could simply be

    new.description = NULL;

    and you could add more lines like

    new.actual_start_date = NULL;

    new.actual_end_date = NULL;



  • 5.  Re: Remove values from Copy

    Posted May 23, 2016 06:40 PM

    Thanks Lindsay, it's nice to be able to remove some of the non-relevant data like actual start date! 

     

    However, I have a slightly different wrinkle - my Change Mgt team wants to copy the ORIGINAL risk value into the new change order. For example if I'm copying from a Risk = 2, then they want the value '2' to copy into the new change.  Currently, the risk field value does NOT copy to the new change.  Thanks for your help!



  • 6.  Re: Remove values from Copy

    Posted May 24, 2016 12:28 AM

    Try:

    new.risk = old.risk;



  • 7.  Re: Remove values from Copy

    Posted May 24, 2016 02:28 AM

    Hi cdtj ,

     

    If only for the copy function, why to not add the  attributes that you would like to be remove from the copy to the exception list of the copy_from_chg() function?

     

    Seems to be more logic vs. to have to clean the attributes after been populated.

    This way you also impact only the copy and can still keep your templates working as before.

    Of course may you want to have this effect on templates too you will have to use your way.

     

    CA have it on the detail_cr/in/pr/chg:

     

    function copy_from_chg()

    {

        if ("$args.KEEP.MAKE_COPY" == "1")

        {

    var exceptions = new Array();

    exceptions[0] = "SET.affected_contact";

    exceptions[0] = "SET.requestor";

    exceptions[0] = "SET.<YourExcludedField>";

    detailCopyEditForm(exceptions);

        }

    }

    My 2 cents.

    /J



  • 8.  Re: Remove values from Copy

    Posted May 24, 2016 02:43 AM

    Hello jmayer,

    Seems that this is better way to restrict attributes in copy.

     

    My solution based on previous experience where copy function were extended: Re: How to Copy Entries in Custom LRel table, so this solution was obvious for me

     

    Regards.



  • 9.  Re: Remove values from Copy

    Posted May 24, 2016 02:48 AM

    Yes agree.may you want to extend the attributes to be copied your choice is the right way (if not the only one)

    Always several roads to the same city

    /J



  • 10.  Re: Remove values from Copy

    Posted May 24, 2016 11:24 AM

    Thanks Jerome!



  • 11.  Re: Remove values from Copy

    Posted May 02, 2016 01:31 PM

    Tks Everyone that worked!!