/build/static/layout/Breadcrumb_cap_w.png

Closing a Child ticket based on details in the parent ticket

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

Answers (0)

Be the first to answer this question

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