/build/static/layout/Breadcrumb_cap_w.png

KACE Product Support Question


Change Queue based on Category

01/17/2017 1290 views
Hey all, 

I found this select/update query here for a SQL rule I'm trying to make. I'm just using it as a template before I add some other things, and everything seems to be written correctly... 

Select Query:

SELECT HD_TICKET.ID, HD_TICKET.TITLE,
HD_TICKET.HD_CATEGORY_ID, HD_TICKET.HD_QUEUE_ID,
HD_CATEGORY.ID, HD_CATEGORY.NAME
FROM HD_TICKET
JOIN HD_CATEGORY ON (HD_CATEGORY.ID = HD_TICKET.HD_CATEGORY_ID)
WHERE HD_CATEGORY.NAME rlike 'File::Access'
AND HD_TICKET.HD_QUEUE_ID = 9
ORDER BY HD_TICKET.ID

Update Query:

UPDATE HD_TICKET, HD_CATEGORY
SET HD_TICKET.HD_QUEUE_ID = 17
WHERE HD_CATEGORY.ID = HD_TICKET.HD_CATEGORY_ID
AND HD_TICKET.ID =


Now I'm just testing this as is and it worked once. I added my changes, and the log states it worked fine but the ticket did not change queues. I removed my changes and remade the query to the base you see above and now it wont move anything. 


I have it set to run on ticket save, new tickets and old tickets will not move. The log states it updates the tickets, and that I've set a custom comment yet no comment is made or movement of ticket despite having the correct category. 


Log: 


01/17/2017 11:25:15> Starting: 01/17/2017 11:25:15 01/17/2017 11:25:15> Executing Select Query... 01/17/2017 11:25:15> selected 1 rows 01/17/2017 11:25:15> Adding ticket comments... 01/17/2017 11:25:16> updated 1 tickets 01/17/2017 11:25:16> Executing Update Query... 01/17/2017 11:25:16> updated 1 rows 01/17/2017 11:25:16> Ending: 01/17/2017 11:25:16


Should I restart my k1000? 


-Thanks!

0 Comments   [ + ] Show comments

Comments


Be the first to answer this question

 
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