This bare-bones ticket rule will send an email to the Approver as soon as the Approver is set and the ticket is saved.
Title: |
Email Approver |
Notes: | Send an email to the Approver as soon as the Approver is set and the ticket is saved. |
Frequency: | on Ticket Save |
Select Query: |
select |
√ | Send an email for each result row |
Subject: |
Ticket [TICK:$ticknum] Requires Your Approval |
Email Column: |
EMAILCOLUMN |
Email Body: |
Ticket: $ticknum - "$title" requires your approval. |
The difference is that this will continue to email the approver each time the ticket is saved until the approval is set (That is, not "none" or blank).
===================
select
HD_TICKET.ID as TICKNUM,
HD_TICKET.TITLE as TITLE,
APPROVER.EMAIL as EMAILCOLUMN,
SUBMITTER.FULL_NAME AS SUBMITTER_FNAME
from
HD_TICKET join HD_TICKET_CHANGE C on HD_TICKET.ID = C.HD_TICKET_ID
and C.ID = (<CHANGE_ID>)
join USER APPROVER on HD_TICKET.APPROVER_ID = APPROVER.ID
JOIN USER SUBMITTER ON SUBMITTER.ID = HD_TICKET.SUBMITTER_ID
where
C.ID = (<CHANGE_ID>)
and APPROVER_ID != 0
and (APPROVAL = 'none' or APPROVAL = '')
===================
This also allowed me to add the submitter's name to the email:
===================
Ticket: $ticknum - "$title," submitted by $submitter_fname, requires your approval.
===================
Hope this can help someone. - ondrar 9 years ago
"HD_TICKET join HD_TICKET_CHANGE C on HD_TICKET.ID = C.HD_TICKET_ID
and C.ID = (<CHANGE_ID>)" - barchetta 3 years ago