K1000 custom ticket rule that only runs in one queue
I have several queues in our K1000 and I am new to SQL of any variety. I am trying to have a ticket rule that will populate parent ticket fields into child ticket fields for a new process, but I want to limit this rule to only a single queue. During my testing a have been able to select and update from parent to child mostly due to http://www.itninja.com/user/jverbosk many posts and blogs on the topic. So many thanks to him for getting me this far.
My problem is that when I run the rule, which is located in the queue both the parent and child will live in, this runs in all queues. Luckily I don't have many parent/child tickets out there so I only botched a few older tickets of little consequence. Based on some posts from 2012 and 2013 I am using HD_TICKET.HD_QUEUE_ID = 3 to try to select only this one queue, but I get an error that states "Error Code: 1054. Unknown column 'HD_TICKET.HD_QUEUE_ID' in 'where clause' " It doesn't matter which queue I try, and I have verified this queue number several times. Same error in MySQL Workbench and my K1000.
Here is my code:
SELECT PARENT.HD_IMPACT_ID, CHILD.HD_IMPACT_ID
FROM HD_TICKET PARENT, HD_TICKET CHILD
WHERE ((HD_TICKET.HD_QUEUE_ID = 3) and PARENT.ID = CHILD.PARENT_ID)
Any help would be greatly appreciated.
My problem is that when I run the rule, which is located in the queue both the parent and child will live in, this runs in all queues. Luckily I don't have many parent/child tickets out there so I only botched a few older tickets of little consequence. Based on some posts from 2012 and 2013 I am using HD_TICKET.HD_QUEUE_ID = 3 to try to select only this one queue, but I get an error that states "Error Code: 1054. Unknown column 'HD_TICKET.HD_QUEUE_ID' in 'where clause' " It doesn't matter which queue I try, and I have verified this queue number several times. Same error in MySQL Workbench and my K1000.
Here is my code:
SELECT PARENT.HD_IMPACT_ID, CHILD.HD_IMPACT_ID
FROM HD_TICKET PARENT, HD_TICKET CHILD
WHERE ((HD_TICKET.HD_QUEUE_ID = 3) and PARENT.ID = CHILD.PARENT_ID)
Any help would be greatly appreciated.
1 Comment
[ + ] Show comment
Answers (2)
Answer Summary:
Please log in to answer
Posted by:
chucksteel
9 years ago
Posted by:
SMal.tmcc
9 years ago
Clearly I need to continue learn this language and try to get a better grip. - Lockdown84 9 years ago