"Undelete" Ticket Work
I've put in a feature request to disable the ability to remove "Work" entries in help desk tickets, but for the time being I've created a custom rule to "undelete" work entries. When work entries are deleted, they are simply hidden ("voided") - they are not permanently deleted from the database. Instead of using a rule, we can also report on work entries in the database to look for disrepencies. However, it is much easier to show all work entries in the tickets themselves.
Why would you care about this? Well, in my environment, we have multiple IT "groups" working in the same queues. Not that we plan on people maliciously removing work entries to make someone look bad, but we all know that it can and does happen. So, here are the select and update statements for the custom rule to automatically undelete all work when someone checks the "Delete" box next to an entry and saves. You can run the rule on a schedule or on ticket save, either way will work fine.
WARNING: This rule is not queue specific - it will undelete all work entries. I can help convert it to a queue specific rule if anyone is interested.
Select Query:
Update Query:
Why would you care about this? Well, in my environment, we have multiple IT "groups" working in the same queues. Not that we plan on people maliciously removing work entries to make someone look bad, but we all know that it can and does happen. So, here are the select and update statements for the custom rule to automatically undelete all work when someone checks the "Delete" box next to an entry and saves. You can run the rule on a schedule or on ticket save, either way will work fine.
WARNING: This rule is not queue specific - it will undelete all work entries. I can help convert it to a queue specific rule if anyone is interested.
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>))
1 Comment
[ + ] Show comment
-
How can I undelete all tickets from a specific queue? Thank you - Emadabu 11 years ago
Answers (1)
Please log in to answer
Posted by:
chris811
14 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.