/build/static/layout/Breadcrumb_cap_w.png

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:
Posted by: Hobbsy 6 years ago
Red Belt
1

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

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ