Clarity Service Management

Expand all | Collapse all

Remove Copy Function For Changes Only (Using Data Partition or Resetting a Custom Field)

Jump to Best Answer
  • 1.  Remove Copy Function For Changes Only (Using Data Partition or Resetting a Custom Field)

    Posted 10-11-2017 01:37 PM

    We have a requirement to remove copy function from the Change tickets because there is a CAB process and the final step is an approved checkbox (custom field). When they copy a Change that has been approved and CAB presented, it brings this value over and is not pulled from through reporting stating that it still requires CAB Approval.

     

    I read this: https://communities.ca.com/message/241972242-re-prevent-copy-menu-item-for-request-ticket-type-only?commentID=241972242#comment-241972242

     

    But that seems to refer to the menu option only for copy, not the Right-Click on the CR Number in a listing and copy.

     

    My questions:

        1.  Can I remove this via data partition?

        2.  If not, is there a way to maybe reset that field if it is copied to a default value of "0" (it is a Boolean checkbox)?

        3.  If not either of those options, where would I find the right-click menu form to disable it there? Would it be the same code as the article above?

        4. Would any of these removals effect template use/creation for other ticket types (CR)?

     

    Any suggestions would be appreciated before I get started.

     

    Thanks,
    Jessie



  • 2.  Re: Remove Copy Function For Changes Only (Using Data Partition or Resetting a Custom Field)

    Posted 10-11-2017 01:51 PM

    Jessie.......

     

     TEC1217945 (How to remove the ability to copy from the CA Service Desk Manager (CA SDM) ticket context menu? ) has steps to remove the copy shortcut from the right-click menu



  • 3.  Re: Remove Copy Function For Changes Only (Using Data Partition or Resetting a Custom Field)

    Posted 10-11-2017 02:11 PM

    In addition to that, to remove it from the File menu the menubar file associated with the role needs to be updated.

     

    Search for these lines

    ( $ACCESS.FAC_chg >= 2 &&
    typeof w.ahdframe.copy_from_chg != "undefined" ) ||

    and change them to..

    /* Customer Modification: Disabling Copy File Menu Option no Change Orders
    ( $ACCESS.FAC_chg >= 2 &&
    typeof w.ahdframe.copy_from_chg != "undefined" ) ||*/


  • 4.  Re: Remove Copy Function For Changes Only (Using Data Partition or Resetting a Custom Field)

    Posted 10-11-2017 02:49 PM

    Thanks gbruneau!  

    @jlhawley does this answer your question?

    if so, mark Paul's or Grants post as correct if you get a moment.

    Thanks guys!

    Jon I.



  • 5.  Re: Remove Copy Function For Changes Only (Using Data Partition or Resetting a Custom Field)

    Posted 10-12-2017 09:09 AM

    I am going to try both methods in my dev environment. Thank you for the replies



  • 6.  Re: Remove Copy Function For Changes Only (Using Data Partition or Resetting a Custom Field)
    Best Answer

    Posted 10-12-2017 01:30 AM

    You should be able to keep copy functionality, but reset approval field. You need to copy tmplcopy_site.spl from bopcfg/majic to site/mods/majic modify copy_chg_site method to set your custom field value e.g.

     

    chg::copy_chg_site(...) {

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

    new.zapproval = 0;

     //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);
     
     return;
    }

     

    Change zapproval to your custom field name

     

    Restart SDM services



  • 7.  Re: Remove Copy Function For Changes Only (Using Data Partition or Resetting a Custom Field)

    Posted 10-12-2017 09:00 AM

    Thanks Giedrius!

    @jlhawley - does this help?

     

    Jon



  • 8.  Re: Remove Copy Function For Changes Only (Using Data Partition or Resetting a Custom Field)

    Posted 10-12-2017 09:10 AM

    I am trying this now. The CAB approval field is a custom field called z_CABAppproved, this will work for that as well?



  • 9.  Re: Remove Copy Function For Changes Only (Using Data Partition or Resetting a Custom Field)

    Posted 10-12-2017 09:20 AM

    Jessie, it should, with "new.zCABApproval = 0;" instead of "new.zapproval = 0;". Thanks _Chi



  • 10.  Re: Remove Copy Function For Changes Only (Using Data Partition or Resetting a Custom Field)

    Posted 10-12-2017 09:23 AM

    I think I do but want to double-check, do I move the whole file tmplcopy_site.spl over into the site/mods directory? I didn't see tmplcopy_site.spl  in there to modify.



  • 11.  Re: Remove Copy Function For Changes Only (Using Data Partition or Resetting a Custom Field)

    Posted 10-12-2017 09:29 AM

    Jessie, you make a copy of the tmplcopy_site.spl from bopcfg/majic folder to site/mods/majic and midify the copy in site/mods/majic. after modify and save, you would need to recycle sdm. Thanks _Chi



  • 12.  Re: Remove Copy Function For Changes Only (Using Data Partition or Resetting a Custom Field)

    Posted 10-12-2017 11:53 AM

    Hi,

    In dev when modifying spel code of already defined method you can eventually speed up your testing by just killing the method engine daemon vs. a full recycle.

     

    using command line:

    pdm_status | FINDSTR spel_srvr //Identify the PID corresponding to the spel daemon (this is the 4 digit number before the date)

    pdm_kill 4124 // where 4124 is the PID identified with pdm_status

    pdm_d_refresh // to reinitialize the count

     

    but....

    NEVER TO THAT ON PROD!

     

    My 2 cents

    /J



  • 13.  Re: Remove Copy Function For Changes Only (Using Data Partition or Resetting a Custom Field)

    Posted 10-12-2017 11:59 AM

    If you prefer powershell..

     

    Get-Process -name spel_srvr | Stop-Process -Force;Start-Sleep -s 5;pdm_d_refresh



  • 14.  Re: Remove Copy Function For Changes Only (Using Data Partition or Resetting a Custom Field)

    Posted 10-12-2017 12:06 PM

    yep quick and efficient

    like to show also that SDM come with their own command (documented or not )

    Thks

    /J



  • 15.  Re: Remove Copy Function For Changes Only (Using Data Partition or Resetting a Custom Field)

    Posted 10-12-2017 01:29 PM

    Thanks All!

    @jlhawley  are you all good on this one?

    Jon I.



  • 16.  Re: Remove Copy Function For Changes Only (Using Data Partition or Resetting a Custom Field)

    Posted 10-12-2017 02:27 PM

    That is perfect, it worked very well and something I can use for other templates and such. Thanks again!



  • 17.  Re: Remove Copy Function For Changes Only (Using Data Partition or Resetting a Custom Field)

    Posted 10-12-2017 02:28 PM

    Nice team work on this guys!

    Thanks for helping Jessie out here!