Question about using labels with ticket rules...

Is there a way to define a rule based on a label? For example, if submitter is in the "VIP" label, then change the priority of the ticket to high. I know I can make individual VIP rules, but I'd like to have it based on the label and then manager which folks are labeled "VIP".

I'd also like to have a ticket rule that would change the ticket based on the machine label of the submitter.

Thanks for any help!

John Garcia
FPG Child Development Institute
University of North Carolina at Chapel Hill
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer

1
This could definitely be done with the custom helpdesk rules.

Just next, next through the wizard and add your own SQL statements.

Give it a shot, we'll help if you get stuck.
Answered 03/01/2012 by: dchristian
Red Belt

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

3
a very basic rules that would keep the priority high when the submitter is a VIP at all times a ticket is changed would look like this:

frequency=on ticket save
/*********select query: *******/
select HD_TICKET.ID
from HD_TICKET JOIN
USER SUBMITTER ON SUBMITTER.ID=SUBMITTER_ID
JOIN USER_LABEL_JT SL ON SL.USER_ID=SUBMITTER_ID
JOIN LABEL L ON L.ID=SL.LABEL_ID
WHERE
L.NAME='VIP'
and <CHANGE_ID> > 0

/******* update query **********/
update HD_TICKET T JOIN HD_STATUS S ON S.HD_QUEUE_ID=T.HD_QUEUE_ID and S.NAME='High'
SET
HD_STATUS_ID=S.ID
WHERE
T.ID =<TICKET_IDS>


Note: i only tested this for syntax errors, but it looks good

If it was my rule i would be checking to see if the status actually changed and leaving an audit trail behind if a rule changed it:
https://www.kace.com/support/kb/index.php?action=artikel&cat=8&id=1046&artlang=en
Answered 03/04/2012 by: GillySpy
Seventh Degree Black Belt

  • I had to use a different code in the "Update Query"section to get it to work. Here the code:

    update HD_TICKET, HD_PRIORITY as T5
    set HD_TICKET.HD_PRIORITY_ID = T5.ID
    where T5.NAME = 'High' and
    HD_TICKET.HD_QUEUE_ID = T5.HD_QUEUE_ID and
    (HD_TICKET.ID in ())
  • Neither update query works for us. Gilly's doesn't make any change, and Olivier's gives us a mysql error (Error 1064 ER_PARSE_ERROR). Any ideas?
  • You could try this:

    SELECT HD_TICKET.ID, HD_TICKET.TITLE, USER.USER_NAME
    FROM HD_TICKET
    JOIN USER ON (USER.ID = HD_TICKET.SUBMITTER_ID)
    JOIN USER_LABEL_JT ON (USER_LABEL_JT.USER_ID = HD_TICKET.SUBMITTER_ID)
    JOIN LABEL ON (LABEL.ID = USER_LABEL_JT.LABEL_ID)
    WHERE LABEL.NAME rlike 'vip'

    UPDATE HD_TICKET, HD_STATUS
    SET HD_TICKET.HD_STATUS_ID = HD_STATUS.ID
    WHERE HD_STATUS.HD_QUEUE_ID = HD_TICKET.HD_QUEUE_ID
    AND STATUS.NAME='High'
    AND T.ID = <TICKET_IDS>

    Hope that helps!

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

Share