This custom OTS (On Ticket Save) ticket rule will make it impossible for anyone in the KBOX console to delete ticket work entries.

Select Query:

SELECT HD_TICKET.ID AS ID FROM HD_TICKET JOIN HD_WORK ON (HD_TICKET.ID = HD_WORK.HD_TICKET_ID) WHERE HD_WORK.VOIDED_BY IS NOT NULL

Update Query:

UPDATE HD_WORK JOIN HD_TICKET ON (HD_TICKET.ID = HD_WORK.HD_TICKET_ID) SET VOIDED_BY = NULL WHERE VOIDED_BY IS NOT NULL AND (HD_TICKET.ID in (<TICKET_IDS>))