I created a custom ticket rule based on the default Reopen rule to only reopen tickets if they have been closed for less than 7 days to prevent people from opening older tickets. That seemed to create problems and wasn't functioning correctly. Here is the SQL for that custom rule:

select distinct HD_TICKET.ID,
               HD_TICKET.OWNER_ID as OWNER_ID,
               HD_TICKET.ID as TICKNUM,
               HD_TICKET.TITLE,
               HD_STATUS.NAME AS STATUS_NAME,
               HD_STATUS.STATE as STATE,
               OWNER.USER_NAME as OWNER_NAME,
               OWNER.FULL_NAME as OWNER_FULLNAME,
               OWNER.EMAIL as OWNER_EMAIL,
               UPDATER.USER_NAME as UPDATERNAME,
               UPDATER.EMAIL as UPDATEREMAIL
          from (HD_TICKET, HD_STATUS)
     left join HD_TICKET_CHANGE on HD_TICKET_CHANGE.HD_TICKET_ID = HD_TICKET.ID
     left join HD_TICKET_CHANGE_FIELD on HD_TICKET_CHANGE_FIELD.HD_TICKET_CHANGE_ID = HD_TICKET_CHANGE.ID
     left join USER OWNER on OWNER.ID = HD_TICKET.OWNER_ID
     left join USER UPDATER on UPDATER.ID = HD_TICKET_CHANGE.USER_ID
         where HD_STATUS.ID = HD_TICKET.HD_STATUS_ID
           and HD_TICKET_CHANGE.HD_TICKET_ID = HD_TICKET.ID
           and HD_TICKET_CHANGE_FIELD.FIELD_CHANGED !='SATISFACTION_RATING'
           and HD_TICKET_CHANGE_FIELD.FIELD_CHANGED !='SATISFACTION_COMMENT'
           and HD_STATUS.STATE = 'closed'
           and (UPDATER.ID != OWNER.ID or OWNER.ID is NULL)
           and DESCRIPTION NOT LIKE '%Changed Ticket Machine from "%" to %Unassigned%'
           and DESCRIPTION NOT LIKE '%Changed Ticket Submitter from "%" to Unassigned%'
           and COMMENT NOT LIKE '%Machine % was deleted%'
           and COMMENT NOT LIKE 'User % was deleted%'
           and DATEDIFF(NOW(), HD_TICKET_CHANGE.TIMESTAMP) < 7

So I went back to the built in rule, but now whenever a user emails in response to a closed ticket even on the same day it creates a new ticket instead of moving the closed ticket to Reopened. I can't figure out why it's doing that. Any help or ideas?

2 Comments   [ + ] Show Comments

Comments

  • UPDATE: If I add a comment to a closed work order when logged in to help desk, then it automatically reopens. Emailed responses create a new work order. Not sure if that helps troubleshooting the problem.
  • This is a great Ticket rule and would be one that i would love to use if it works correctly. did you ever manage to get this fixed?
Please log in to comment

There are no answers at this time

Answers

Answer this question or Comment on this question for clarity