{"id":8176,"date":"2024-07-31T03:23:52","date_gmt":"2024-07-31T03:23:52","guid":{"rendered":"https:\/\/pariswells.com\/blog\/?p=8176"},"modified":"2024-07-31T03:27:27","modified_gmt":"2024-07-31T03:27:27","slug":"how-to-clear-old-tickets-in-connectwise-automate","status":"publish","type":"post","link":"https:\/\/pariswells.com\/blog\/research\/how-to-clear-old-tickets-in-connectwise-automate","title":{"rendered":"How to clear old Tickets in Connectwise Automate"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code class=\"\">DELETE FROM tickets WHERE updatedate &lt; DATE_ADD(NOW(),INTERVAL - 1 YEAR); \nDELETE FROM ticketdata WHERE ticketid NOT IN ( SELECT ticketID FROM tickets );\nDELETE FROM timeslips WHERE ticketid NOT IN ( SELECT ticketID FROM tickets );\nDELETE FROM Databasefails WHERE ticketid NOT IN ( SELECT ticketID FROM tickets );\nDELETE FROM Databasealerts WHERE ticketid NOT IN ( SELECT ticketID FROM tickets ); \nDELETE FROM plugin_cw_ticket_failures WHERE ticketid NOT IN ( SELECT ticketID FROM tickets ); \nDELETE FROM Projects WHERE ticketid NOT IN ( SELECT ticketID FROM tickets );<\/code><\/pre>\n\n\n\n<p>how to purge &#8220;ticketdata&#8221; connectwise<\/p>\n","protected":false},"excerpt":{"rendered":"<p>how to purge &#8220;ticketdata&#8221; connectwise<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-8176","post","type-post","status-publish","format-standard","hentry","category-research"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/8176","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/comments?post=8176"}],"version-history":[{"count":2,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/8176\/revisions"}],"predecessor-version":[{"id":8178,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/8176\/revisions\/8178"}],"wp:attachment":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/media?parent=8176"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/categories?post=8176"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/tags?post=8176"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}