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.
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.
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
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" ) ||*/
@jlhawley does this answer your question?
if so, mark Paul's or Grants post as correct if you get a moment.
I am going to try both methods in my dev environment. Thank you for the replies
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.
object old, new, chgalg, gl; old=argv; new=argv; chgalg=argv; gl=argv;
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
@jlhawley - does this help?
I am trying this now. The CAB approval field is a custom field called z_CABAppproved, this will work for that as well?
Jessie, it should, with "new.zCABApproval = 0;" instead of "new.zapproval = 0;". Thanks _Chi
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.
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
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
NEVER TO THAT ON PROD!
My 2 cents
If you prefer powershell..
Get-Process -name spel_srvr | Stop-Process -Force;Start-Sleep -s 5;pdm_d_refresh
yep quick and efficient
like to show also that SDM come with their own command (documented or not )
@jlhawley are you all good on this one?
That is perfect, it worked very well and something I can use for other templates and such. Thanks again!
Nice team work on this guys!
Thanks for helping Jessie out here!