/build/static/layout/Breadcrumb_cap_w.png

K1000 notification: send just the last comment to the submitter

the email notification that kace has are a bit limited and the instruction that you can use more even. i wanted to send an email notification to the submitter when whoever (owner or not) add a note in his ticket, but i wanted to send just the las comment, not the whole conversation neither the person who is writting or other information, just the new added comment. So my rule is this:

->Select SQL

SELECT HD_TICKET.ID as ID,HD_TICKET.TITLE as TITLE, 
           E.FULL_NAME as SOLICITANTE,
           DONO.FULL_NAME as ATENDENTE, 
           E.EMAIL as EMAIL_SOLICITANTE,
           HTC.COMMENT AS COMENTARIO,
           S.NAME AS ESTADO
        
FROM(HD_TICKET, HD_PRIORITY, HD_STATUS, HD_IMPACT, HD_CATEGORY) 
left join USER DONO on DONO.ID = HD_TICKET.OWNER_ID 
LEFT JOIN USER E on E.ID = HD_TICKET.SUBMITTER_ID
        LEFT JOIN HD_STATUS S ON (HD_TICKET.HD_STATUS_ID = S.ID)
    
inner Join ( Select TC.HD_TICKET_ID, max(TC.ID) IDFilho from HD_TICKET_CHANGE TC 
inner join HD_TICKET_CHANGE_FIELD F on ( F.HD_TICKET_CHANGE_ID = TC.ID) 
Group by TC.HD_TICKET_ID ) X on ( X.HD_TICKET_ID =  HD_TICKET.ID )
                
inner Join HD_TICKET_CHANGE_FIELD F on ( F.HD_TICKET_CHANGE_ID = X.IDFilho)
inner Join HD_TICKET_CHANGE HTC  on ( X.IDFilho = HTC.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 F.FIELD_CHANGED = 'COMMENT' and
   HTC.USER_ID  != HD_TICKET.SUBMITTER_ID 

group by HD_TICKET.ID


->Active the checkbox to send email

Title:[$id] $title - $estado
Email: EMAIL_SOLICITANTE
Message: 

Prezado(a) $solicitante,

Uma nota foi adicionada ao seu chamado:

$comentario

Corpo do chamado:
http://yourservicedeskdirection/adminui/ticket.php?ID=$id

Atenciosamente, 


Hope it is useful!!!


Comments

This post is locked
 
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