/build/static/layout/Breadcrumb_cap_w.png

K1000 Service Desk: Custom Ticket Rule

I have a ticket rule to email the supervisor when a ticket is in a state for more than a certain period of time. I am trying to add a variable based on ticket owner so i can have separate rules based on the ticket owner's supervisor. Here is the statement I have that works getting all tickets in status 'New' for 7 days or more:

Select 'cfrey@wacoisd.org' AS CHARLIE,

S.NAME AS STATUS, T.ID AS ID, T.TITLE AS ISSUE,

U.FULL_NAME AS SUBMITTER, O.FULL_NAME AS OWNER,

T.CREATED AS CREATED, T.MODIFIED AS STALLED

FROM HD_TICKET T

JOIN HD_STATUS S ON (S.ID = T.HD_STATUS_ID)

JOIN USER U ON (U.ID = T.SUBMITTER_ID)

JOIN USER O ON (O.ID = T.OWNER_ID)

WHERE (S.NAME = 'New' AND DATEDIFF(NOW(), T.MODIFIED) >= 7 

AND T.HD_QUEUE_ID = 1

I want to add: AND O.FULL_NAME = 'Arturo Jimenez'

When I add that after '>=7' I get 0 results even though without that statement it pulls tickets by that owner. Any ideas?


0 Comments   [ + ] Show comments

Answers (2)

Answer Summary:
Posted by: lmland 11 years ago
10th Degree Black Belt
0

I changed the variable to AND O.USER_NAME = 'ajimenez' and it works. Didn't like the full name for some reason, but user name worked.


Comments:
  • It may not have liked the space.

    John - jverbosk 11 years ago
Posted by: jverbosk 11 years ago
Red Belt
0

If you change the statement slightly to this, does it return anything?

AND O.FULL_NAME rlike 'Arturo'

John

 


Comments:
  • Yes it worked with just the first name. username is probably better anyway since it is definitely unique. - lmland 11 years ago
  • Agreed, that's the approach I would suggest.

    John - jverbosk 11 years ago

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