Clarity Service Management

Expand all | Collapse all

Attachment Sync Restriction On CA Service Desk

Jump to Best Answer
  • 1.  Attachment Sync Restriction On CA Service Desk

    Posted 12-20-2017 05:47 AM

    Hi Team,

     

    OOTB attachment sync is enable in CA Service Desk to copy the attachment from CA Service Desk to CA Service Catalog.As well as we have custom process to copy the attachment from CA Service Catalog to CA Service Desk.

    Now when we are attaching something in Catalog it will sync properly in CA SDM but since OOTB attachment sync is enable in CA SDM it will again re-attaching to Catalog.

    My query is, is there any way to restrict the sync attachment from SDM to Catalog if attachment is coming from Catalog?

     

    Best Regards,

    Pankaj



  • 2.  Re: Attachment Sync Restriction On CA Service Desk

    Posted 12-20-2017 08:33 AM

    Hi Pankaj,

    I am not sure off hand that this can be done from the SDM side because the trigger is not user-editable and will not be able to differentiate whether the attachment came in from catalog or not.  There may be something on the catalog side to check if that same attachment already exists, and if so, ignore it??  Not sure.

    Anyone else have any ideas here for Pankaj?

    Jon I.



  • 3.  Re: Attachment Sync Restriction On CA Service Desk

    Posted 12-20-2017 07:58 PM

    Hi Jon,

     

    The trigger is editable. We rebuilt it to use a custom field because we didn’t like that it used external_system_ticket.

    To modify the script/trigger copy the itsm.spl and itsm.maj from bopcfg/magic to site/mods/magic



  • 4.  Re: Attachment Sync Restriction On CA Service Desk
    Best Answer

    Posted 12-20-2017 07:54 PM

    Hi,

     

    Service desk manager uses the scripts in itsm.spl and maj files to control what is input into the usp_itsm_msg_queue table. The Catalog sync daemon will pickup new entries in that table and try to push them to the related service catalog request.

    The itsm.spl scripts look for the text “CASC-” at the beginning of the activity description. If that string is found the activity will not be sent back to service Catalog. 

    Which means you can prefix your activity log description with CASC- to stop it from synchronizing back to service catalog.



  • 5.  Re: Attachment Sync Restriction On CA Service Desk

    Posted 12-21-2017 07:39 AM

     

    Hi Grant,

    Thanks for the reply.

    In my case 'Catlog attachment' is the prefix, so if I change CASC to 'Catlog attachment' in itsm.spl then it should work.

     

    Best Regards,

    Pankaj



  • 6.  Re: Attachment Sync Restriction On CA Service Desk

    Posted 12-21-2017 08:29 AM

    Thanks Grant!!

    @Pankaj007  - let us know if Grant's info helped you out here.



  • 7.  Re: Attachment Sync Restriction On CA Service Desk

    Posted 12-21-2017 09:11 AM

    Hi Pankaj,

     

    That's right, copy itsm.spl and itsm.maj from nx_root/bopcfg/magic to nx_root/site/mods/magic.  Then open the version in nx_root/site/mods/magic with an editor.

     

    Find line 257, which is part of the lrel_attachments_requests function for synchronizing sdm attachments to service catalog.  It should look like this.

         // Check if attachment file name starts with 'CASC', If yes, implies that the attachment is comming from Catalog, no need to Sync it to Catalog, we simply return
         if(sindex( file_name, "CASC", 0 ) != -1 || is_null(cat_req_id) || is_empty(cat_req_id) || cr_type == 'P')

    and update it to this..

         // Check if attachment file name starts with 'CASC', If yes, implies that the attachment is comming from Catalog, no need to Sync it to Catalog, we simply return
         if(sindex( file_name, "Catalog attachment", 0 ) != -1 || is_null(cat_req_id) || is_empty(cat_req_id) || cr_type == 'P')

    If you need Change Order attachments to synchronize back to Service Catalog you can also update the lrel_attachments_changes function at line 371.

     

    Once you've made your chances recycle service desk and test.



  • 8.  Re: Attachment Sync Restriction On CA Service Desk

    Posted 12-21-2017 09:46 AM

    I think you may also need to change file_name to attmnt_desc.