/build/static/layout/Breadcrumb_cap_w.png

Email alert when un-assigned ticket arrives

Hello all.

I need to setup a facility to email 2 users when an un-assigned ticket arrives.
I'm assuming i need to create a custom ticket rule but dont know how to do this, can anybody provide some assistance or is there a better way of doing this?

Also, is there any way to automatically refresh the screen every 60 secs to allow us to see if new jobs have been added to any of the queues?

Thanks in advance.

0 Comments   [ + ] Show comments

Answers (4)

Posted by: KboxKen 11 years ago
Orange Belt
1

For garrysabino and anyone else who needs it, here is the answer to the orginal question:
(Being used at the moment on a K1000, v5.4.76847)

Question #2 first: "Also, is there any way to automatically refresh the screen every 60 secs to allow us to see if new jobs have been added to any of the queues"

This feature came out recently, not sure which version. Click on "Choose Action" then "Auto-Refresh".

 

Question #1: Email on Unassigned Tickets

This link is still valid, it is what I followed:
http://www.kace.com/support/resources/kb/article/How-To-Notify-Any-User-or-Group-by-Email-When-a-New-Help-Desk?action=artikel&cat=8&id=613&artlang=en

My settings (repeat for each Queue you want this to work in):
Title: Unassigned ticket update - Notify Owners
Order: 100
Frequency: On Ticket Save
Enabled: checked
Select Query: (Make sure to set the email address in the code where commented)

 select HD_TICKET.ID, 
HD_TICKET.ID as TICKNUM,
HD_TICKET.TITLE,
OWNER.USER_NAME as OWNER_NAME,
U3.USER_NAME as LASTINPUTNAME,
DATE_FORMAT(HD_TICKET.CREATED,'%b %d %Y %I:%i:%s %p') as CREATED,
DATE_FORMAT(HD_TICKET.MODIFIED,'%b %d %Y %I:%i:%s %p') as MODIFIED,
HD_STATUS.NAME AS STATUS_NAME,
HD_STATUS.ORDINAL as STATUS_ORDINAL,
STATE,
OWNER.FULL_NAME as OWNER_FULLNAME,
OWNER.EMAIL as OWNER_EMAIL,
U2.USER_NAME as SUBMITTER_NAME,
U2.FULL_NAME as SUBMITTER_FULLNAME,
U2.EMAIL as SUBMITTER_EMAIL,
U3.USER_NAME as UPDATER_NAME,
U3.FULL_NAME as UPDATER_FULLNAME,
U3.EMAIL as UPDATER_EMAIL,
'admin@your-domain.com' as NEWTICKETEMAIL, /*<<<change your email here */
UNIX_TIMESTAMP(HD_TICKET_CHANGE.TIMESTAMP),
COMMENT
from ( HD_TICKET,
HD_PRIORITY,
HD_STATUS,
HD_IMPACT,
HD_CATEGORY)
JOIN HD_TICKET_CHANGE ON HD_TICKET_CHANGE.HD_TICKET_ID = HD_TICKET.ID
and HD_TICKET_CHANGE.ID=<CHANGE_ID>
left join USER OWNER on OWNER.ID = HD_TICKET.OWNER_ID
left join USER U2 on U2.ID = HD_TICKET.SUBMITTER_ID
left join USER U3 on U3.ID = HD_TICKET_CHANGE.USER_ID
where HD_PRIORITY.ID = HD_PRIORITY_ID
and HD_STATUS.ID = HD_STATUS_ID
and HD_IMPACT.ID = HD_IMPACT_ID
and HD_CATEGORY.ID = HD_CATEGORY_ID
and OWNER_ID=0
and HD_TICKET_CHANGE.DESCRIPTION NOT LIKE 'TICKET CREATED%'


Send query results to someone: unchecked
Results are tickets, add a comment to each one: unchecked

Send an email for each result row: checked
Subject: [TICK:$ticknum] $title
Email Column: NEWTICKETEMAIL
Email Body:

On $modified, $updater_fullname ($updater_email) updated UNASSIGNED ticket # $ticknum

Ticket Title:
$title

Updated Ticket Comments:
$comment

----
Please review this ticket online, and take ownership or assign an owner, at
https://k1000/adminui/ticket?ID=$ticknum

Run an update query, using the results from the one above: Unchecked

Hope this helps!
Ken


Comments:
  • Thanks Kim but it didn't work for me. I followed all your instructions and changed the email address. The rule is enabled. Is it normal not get anything on the "Next Run" column? - garrysabino 11 years ago
    • "Next Run" is grayed out because it is set to run "On Ticket Save" - KboxKen 11 years ago
  • Search Results returns this error:

    mysql error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= left join USER OWNER on OWNER.ID = HD_TICKET.OWNER_ID left join ' at line 7] in EXECUTE("SELECT COUNT(*) FROM ( HD_TICKET, HD_PRIORITY, HD_STATUS, HD_IMPACT, HD_CATEGORY) JOIN HD_TICKET_CHANGE ON HD_TICKET_CHANGE.HD_TICKET_ID = HD_TICKET.ID and HD_TICKET_CHANGE.ID= left join USER OWNER on OWNER.ID = HD_TICKET.OWNER_ID left join USER U2 on U2.ID = HD_TICKET.SUBMITTER_ID left join USER U3 on U3.ID = HD_TICKET_CHANGE.USER_ID where HD_PRIORITY.ID = HD_PRIORITY_ID and HD_STATUS.ID = HD_STATUS_ID and HD_IMPACT.ID = HD_IMPACT_ID and HD_CATEGORY.ID = HD_CATEGORY_ID and OWNER_ID=0 and HD_TICKET_CHANGE.DESCRIPTION NOT LIKE 'TICKET CREATED%' and HD_TICKET.HD_QUEUE_ID = '11' LIMIT 1") - garrysabino 11 years ago
    • I looked over the code and the code I have is quite a bit different then the code I used a couple of years ago, but it appears to still work the same.

      How are you getting the error, but you mention 'Search Results"... how are you testing the code to get this error? - KboxKen 11 years ago
  • There's a clickable "View Ticket Serarch Result" under the code, that's where I get the errors. - garrysabino 11 years ago
    • Ahh. I don't think there are any results as this rule only applies when a ticket that is unassigned gets updated. I suggest testing the rule by updating an unassigned ticket. From my experience, an email should get sent out to the address you programmed into the code, for any update (email or web-based) to an unassigned ticket in the queue you have this custom rule in. - KboxKen 11 years ago
  • Got you... let me try, Thanks. - garrysabino 11 years ago
  • I'm not getting any email when a new ticket is created neither when changes is made to any ticket. I deleted and created it again but no luck. - garrysabino 11 years ago
  • Now i'm getting notification when changes is made to a ticket but not on newly created tickets. Any idea? - garrysabino 11 years ago
    • Hey garrysabino,
      This code is only for changes made on unassigned tickets. I use a different code set for notifying admins that there is a newly created ticket. I also have one for emailing the Submitter (user) when their ticket is received by the system. Both of these code sets came from KACE. This reply area is not a great place to paste the code, so here are links to the articles that I think are revelant:

      Admins update:
      http://www.kace.com/support/resources/kb/article/How-To-Notify-Any-User-or-Group-by-Email-When-a-New-Help-Desk

      Submitter notifications: (I think this will work in combination with the above rule).
      http://www.kace.com/support/resources/kb/article/We-use-LDAP-authentication-for-our-user-Help-Desk - KboxKen 11 years ago
  • Submitters are currently receiving a confirmation that ticket was created when they email the helpdesk. Ticket owners are also notified that a ticket has been assign to their Queue. These are working fine with "Email on Events" without ticket rule (see attached).

    Our default queue for new ticket is "Dispatch" and default status is "New". Now, How can I create a rule that will send an email to me when a new ticket is created without overriding the above email on events? I'm a bit confuse on the link you gave me because email to submitter seems to be included in the script. Please help. - garrysabino 11 years ago
    • Hey garrysabino, I would love to help more with this, but I am pretty swamped at the moment with the day job... need to pay the bills and all that. I don't actually work for KACE, so I suggest calling KACE support as they can walk you though any needed changes and suggest code that is probably more current then the bits I am using. If they can't help, and when things slow down on my end, I would be happy to circle back to this. - KboxKen 11 years ago
Posted by: KboxKen 13 years ago
Orange Belt
0
Hey dave1kelsey,

I asked KACE the same question and they refereed me here for the solution. It has been working great for us. If you need it, I can PM you some screen shots of my code, but I pretty much just followed this:

http://www.kace.com/support/kb/index.php?action=artikel&cat=8&id=613&artlang=en

Also, this might help:
http://www.kace.com/support/kb/index.php?action=artikel&cat=8&id=898&artlang=en

Later,
Ken

Comments:
  • Hi Ken, i'm also trying to accomplish this but I'm afraid of creating problem with the current "Event on events" config. Do you mind shring your code? Thanks in advance. - garrysabino 11 years ago
    • Posted the code for you. - KboxKen 11 years ago
Posted by: dave1kelsey 13 years ago
Orange Belt
0
Thanks thats brilliant, will read through properly tomorrow.
Posted by: garrysabino 11 years ago
Senior White Belt
0

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

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