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:
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

Comments

  • How can I undelete all tickets from a specific queue? Thank you
Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

1
Awesome!! exactly what I was looking for, I agree with you about deleting other's people work.
Answered 04/02/2010 by: chris811
Orange Belt

Please log in to comment
Answer this question or Comment on this question for clarity