I have 2 queues
User request Queue where hr puts user creates, deletes, modifies. i have a process for this queue for user creates that creates child tickets into our main help desk queue
I would like to automate the process by closeing the child tickets that are in my IT help desk queue that arnt requried because for example computer equipment isnt required.

I took a look at the database tables to think through exactly what i needed to happen and i came up with this sql script. If i had access beyond read to the database through workbench this script would work.

update HD_TICKET set HD_STATUS_ID = 67
WHERE PARENT_ID = (select ID from HD_TICKET
where IS_PARENT=1 and HD_QUEUE_ID=10
and CUSTOM_FIELD_VALUE8 not like 'Laptop'
and CUSTOM_FIELD_VALUE8 not like 'Desktop') AND (HD_CATEGORY_ID = 80 OR HD_CATEGORY_ID = 82)

i tested to see if i got the correct select data by running this script

SELECT * FROM HD_TICKET WHERE PARENT_ID = (
select ID from HD_TICKET
where IS_PARENT=1
and HD_QUEUE_ID=10
and CUSTOM_FIELD_VALUE8 not like 'Laptop'
and CUSTOM_FIELD_VALUE8 not like 'Desktop') AND (HD_CATEGORY_ID = 80 OR HD_CATEGORY_ID = 82)

so now i need someone who actually knows this stuff to help me to get this to work within KACE where i have permissions to change the database ;)
here are some details as to what each of the above represents

HD_STATUS_ID = 67 Closed - Not Required
HD_QUEUE_ID=10   User Add/Change Request Queue
HD_CATEGORY_ID = 80 Computer::Request::Desktop
HD_CATEGORY_ID = 82
Computer::Request::Laptop
CUSTOM_FIELD_VALUE8 Equipment Request

So what this essential does is looks at the parent ticket and then if laptop and desktop are not selected in the Equipment Request Portion of the Parent ticket it then closes the child ticket marking it as Closed - Not Required that has a Category set as either desktop or laptop request.

I have only had my kace for a month and my brain has come up with many things i would like to do to automate and make things simple.
I am hoping that someone on this site can assist in educating me or at least let me know if my thoughts are to grand and i cant accomplish them.

Thank-you
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

There are no answers at this time

Answers

Answer this question or Comment on this question for clarity