Clarity Service Management

Expand all | Collapse all

Tip: How to Archive and Purge a specific ticket, in Service Desk Manager.

  • 1.  Tip: How to Archive and Purge a specific ticket, in Service Desk Manager.

    Posted 10-09-2017 02:00 AM

    The question came up how to set an Archive and Purge Rule for a specific ticket in CA ITSM.

     

    It was an unusual request, because you don't normally need to remove single tickets, but was needed because this ticket had an inordinately high number of Attached Events to it for some reason.

     

    Still, it illustrates the use of the "Additional Query" function within Archive and Purge. This feature allows a great deal of flexibility in removing records, and this is a simple example.

     

    Note that it is better to Archive and Purge a troublesome record, as it removes all of the related records. Just removing it only from the Call_Req table via database commands is bad practice, as it leaves orphaned data in other tables.

     

    Additional Query Example

     

    For the Call Request with a ticket number of "24" (as seen through the interface), the Additional Query code is:

     

    ref_num = \'24\'

     

     

    Note that you need to escape the single quotes with a backslash.

     

    After running, the above example left this line in the arcpur.log.0 file:

     

    11/23/2017 10:17:30, One_Call_Req_ONLY, cr, 24, archive and purge,
    C:\PROGRA~2\CA\SERVIC~1\site\data\archive\20171123T1017_One_CR

     

     

    Basic Troubleshooting of Archive and Purge

     

    In order to make this work, all of the normal rules of Archive and Purge apply.  It is also best to test rules (a) on a test server and (b) in "Archive Only" mode until confirmed that they work.

     

    If your query does not work, then check items such as:

     

    • Object Name is right - Call Request rather than Incident, for example.
    • You have run the Rule within a valid Schedule - A weekend only schedule won't let a rule run on Monday.
    • The Days Inactive has passed - can reset server time on a test server to test.
    • No errors in the stdlog or the archive log (same logs folder).
    • The ticket is Inactive as well as Closed.
    • If more details are needed, put on this tracing: 
      pdm_logstat -n arcpur_srvr TRACE

      and turn off when done with:

      pdm_logstat -n arcpur_srvr

     

    Thanks, Kyle_R.



  • 2.  Re: Tip: How to Archive and Purge a specific ticket, in Service Desk Manager.

    Posted 10-09-2017 09:33 AM

    Hi Kyle,

     

    I think this document should replace this tech doc: TEC477556 which in my opinion has a slight flaw as it leaves several tables, e.g. act_log orphaned if you consider that the method described does not cater for linked tables and thus breaks referential integrity.

     

    Kind Regards,

    Brian



  • 3.  Re: Tip: How to Archive and Purge a specific ticket, in Service Desk Manager.

    Posted 10-09-2017 10:23 PM

    Thanks Brian - gave me a morning's work. :-)

     

    I've retired TEC477556 and published a new document TEC1287591 with the above steps.

     

     

    Thanks, Kyle_R.

     

    EDIT: 

    TEC1287591 How to Archive and Purge a specific ticket, in Service Desk Manager. 



  • 4.  Re: Tip: How to Archive and Purge a specific ticket, in Service Desk Manager.

    Posted 10-12-2017 05:30 AM

    Hi Kyle,

    Great article for introduction to archive and purge functionality!

     

    On a side note for the use case presented.

    You may want to point out that only inactive tickets are purged out. Meaning you first have to close this ticket before been able to purge it.

    Closing the ticket isn't either supposed to detach all the associated events(at less for service type events) either if I know that you may time to time want to keep events on closed ticket.

     

    My 2 cents

    /J



  • 5.  Re: Tip: How to Archive and Purge a specific ticket, in Service Desk Manager.

    Posted 02-04-2019 02:00 AM

    I've updated the original TEC document to the new KB format with some minor changes from this thread and issues here:

     

    How to Archive and Purge a specific ticket, in Ser - CA Knowledge 

     

    Thanks, Kyle_R.