3 Replies Latest reply on Oct 6, 2014 1:03 PM by Keith Scarborough

    Is there a way to archive old work orders?

      Share This:

      After a year and two months of service, we've finally hit work order number 10,000. Our system is full of the same signature images as attachments and it's time to do a little cleaning up.


      Is there a way that we can archive old work orders (say anything closed out more than 6 months ago) and purge the old attachments to free disk space? Archive != delete. Old work orders should still be available to users and techs. If we can't archive the work orders, can we at least purge the old attachments? The same 5 KB image over and over is 50 MB of the same thing. De-duplication would be an amazing thing (ssdfghsjdk.png MD5 hash = 75623fc59e83f6c402f59b15fbf6e781 && 3wrewiuryru.png MD5 hash = 75623fc59e83f6c402f59b15fbf6e781 == same image, destroy 3wrewiuryru.png, reference ssdfghsjdk.png instead) in this instance.


      Thank you!

        • 1. Re: Is there a way to archive old work orders?



          Currently there is not an "archive" function in Track-It!.  Most customers will periodically (semi-annually, annually, etc.) make a full backup of the database, then store that in a safe location; then they'll delete all work orders from Track-It! that were closed on or before a certain date (3 months back, 6 months back, etc.)


          Deleting these from within Track-It! will also remove any associated attachments.


          In the event that you need to review something that was removed, you can spin up a test Track-It! system and mount that backed up database there long enough to access information.  If the attachments are necessary, then you'll need to back up your Repositories along with the database prior to doing your housekeeping.


          The Repositories contain all of the attachments.  They are typically located in a path similar to  C:\Program Files (x86)\BMC Software\Track-It!\Track-It! Services\FileStorageData\Repositories.


          Work order attachments will be in an IncidentRepository folder under that path.  If you open the IncidentRepository folder, you should see numbered folders.  Each folder number corresponds to a work order number.  Only work orders with attachments will have a numbered folder here.  The numbered folder should have all attachments for that work order.  (This is why we can't currently run a de-duplication method like what you mentioned; each work order and its attachment are self-contained.)


          There's also a database table that holds a "pointer" to the attachment.  That table will have the name of the attachment, the owner, the last modified time, etc.  This is what shows on the Attachment tab of the work order.


          If you were to remove an attachment from the file system but not from the database, then the next time you opened that work order the Attachment tab would still show the same information that it showed before you removed the attachment.  However, if you double click the attachment to download or open it, you'll get an error message stating something to the effect of "The attachment XYZ.doc is no longer available.  Do you wish to remove it?"


          Choosing Yes will remove the entry from the database.  Choosing No will leave the database entry, and you'll continue to get this error on this work order unless you restore the attachment.


          So, to answer your initial question of "can we purge old attachments", the short answer is yes you can.  Depending on how you do it, though, it may cause an error if you do open an older work order.



          • 2. Re: Is there a way to archive old work orders?

            Thanks for the detailed reply!


            What about templates? I've noticed templates are assigned work order numbers and we have some templates with attachments like PDF forms that must be completed. Will these be effected or do I essentially have to make note of those work order numbers to avoid purging those?

            • 3. Re: Is there a way to archive old work orders?

              If you do your purging from within Track-It!, then you don't have to worry about Templates.  Within the GUI, "work orders" and "templates" are treated completely differently.


              Now, if you do your purge from within SQL (highly discourage, by the way, for a bunch of reasons), then you must account for your templates.