I have a rule in place that sends an email out when a new ticket is created in a queue which works just fine, but I am looking to send a notification to the group when someone moves a ticket into a queue.

I edited the code from the new ticket email rule and changed the rule to look for a ticket being moved to the application development queue:

select HD_TICKET.ID,
HD_TICKET.ID as TICKNUM,
HD_TICKET.TITLE,
U1.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,
U1.FULL_NAME as OWNER_FULLNAME,
U1.EMAIL as OWNER_EMAIL,
U2.USER_NAME as SUBMITTER_NAME,
U2.FULL_NAME as SUBMITTER_FULLNAME,
U2.EMAIL as SUBMITTER_EMAIL,
U3.EMAIL as UPDATEREMAIL,
'groupname@mydomain.org' as NEWTICKETEMAIL,
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 U1 on U1.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
HD_TICKET_CHANGE.DESCRIPTION LIKE 'TO APPLICATION DEVELOPMENT%'


Their Queue name is Application Development. My goal was to look at the change description and see if a ticket was changed. I have this setup as a "on ticket save" perhaps this needs to be a scheduled scenario?
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

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

Answers

0

Found the problem, needed another % on the left side of what I was looking for...works great now.

From the example above, change this line from this:

HD_TICKET_CHANGE.DESCRIPTION LIKE 'TO APPLICATION DEVELOPMENT%'

to this:

HD_TICKET_CHANGE.DESCRIPTION LIKE 'TO %APPLICATION DEVELOPMENT%'

Answered 06/30/2011 by: James@Grow
Orange Belt

Please log in to comment
0
Nicely done
Answered 06/30/2011 by: GillySpy
Seventh Degree Black Belt

Please log in to comment
0

Hi 

I am facing exactly same problem on it. May i know your custom ticket rules is under which queue ? which mean the ticket rules is under "APPLICATION DEVELOPMENT" queue or ORIGINAL queue ? 

 

 

 

Answered 01/10/2013 by: ivankuah
White Belt

  • It really doesnt matter where it goes, because you are narrowing down where the queue is that you are looking for new notifications on. I put mine under the app dev queue just so I could better keep track of the rules in play.
Please log in to comment
0

I found the problem. The Ticket rules required create at APPLICATION DEVELOPMENT. Thanks

Answered 01/10/2013 by: ivankuah
White Belt

Please log in to comment
0

Hey James, what line did you modify so that you would be notified when a new ticket was created? Was it the "HD_TICKET_CHANGE.DESCRIPTION?

Answered 01/22/2013 by: glummeee
Senior White Belt

Please log in to comment
0

I think what you are after is this line:

HD_TICKET_CHANGE.DESCRIPTION LIKE 'TO %APPLICATION DEVELOPMENT%'

Basically you need to set it to whatever the queue name in question is and add make sure there is a % sign on both ends of the queue name.

 

Answered 01/23/2013 by: James@Grow
Orange Belt

Please log in to comment
Answer this question or Comment on this question for clarity