How to assign ticket to IT tech who comments on it?
I tried copy/pasting what was suggested in this question: http://www.itninja.com/question/create-a-rule-to-assign-the-first-service-desk-commenter-as-the-owner-and-change-status but it's not working. If I comment and hit Submit, nothing. If I comment and hit Save, nothing.
Is something wrong, or need to be edited, in the SQL section? I am using the latest version 8.0.318.
Select SQL:
SELECT HD_TICKET.ID,
HD_TICKET.TITLE,
HD_TICKET.SUMMARY,
HD_TICKET.OWNER_ID,
HD_TICKET.SUBMITTER_ID,
HD_TICKET.HD_STATUS_ID,
C.USER_ID,
C.COMMENT
FROM ORG1.HD_TICKET
JOIN ORG1.HD_TICKET_CHANGE C on C.HD_TICKET_ID = HD_TICKET.ID
WHERE C.COMMENT != '' AND
SUBMITTER_ID != USER_ID AND
HD_TICKET.OWNER_ID = 0
Run update query:
UPDATE HD_TICKET
JOIN HD_TICKET_CHANGE C on C.HD_TICKET_ID = HD_TICKET.ID
SET HD_TICKET.OWNER_ID = C.USER_ID
WHERE C.COMMENT != '' AND
SUBMITTER_ID != USER_ID AND
HD_TICKET.OWNER_ID = 0 AND
HD_TICKET.ID in (<TICKET_IDS>)
frequency:
when saving ticket
0 Comments
[ + ] Show comments
Answers (1)
Answer Summary:
Please log in to answer
Posted by:
Hobbsy
6 years ago
Top Answer
I'm no SQL guru, but looking at the code in "english" the update statement seems to say
Update the ticket owner ID to the user ID
when the comment is not a space and
when the submitter is not the user and
when there is no ticket owner
maybe try it without the line
HD_TICKET.OWNER_ID = 0
Comments:
-
Thanks! I removed HD_TICKET.OWNER_ID = 0 AND from the Update SQL section and that worked. Our emails say "ticket assigned to: ()" inow nstead of the owner's name but that's a problem for another time. - ITUTC 6 years ago