You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2011-10-10 08:39:16

kai891028
Member
Registered: 2011-03-07
Posts: 5

Email Template

Hi, I have an email template like below. I've checked many times the ## tags, nothing is wrong. But why are some of the tags are still appearing in my emails?

Hello ##ticket.openbyuser##,<br />
<br />
##IFticket.storestatus=new##
Your help desk request is received, our support team will respond to your query within one business day. When the ticket is responded you will receive an email, or you can log in to our help desk system at <a href="##ticket.url##">##ticket.url##</a> anytime to follow up on the status of your ticket. Your ticket reference number is [##ticket.id##].<br />
##ENDIFticket.storestatus##
This is a computer generated email, please do NOT reply to this email. Any email sent to noreply@lblgh.com will be automatically discarded.<br />
<table style="width:100%;">
    <tr style="background-color:#045E92">
        <td colspan="2" style="font-weight:bold; color:#FFFFFF;">##ticket.title##</td>
    </tr>
    <tr>
        <td style="text-align:right; font-weight:bold; width:15%;">Requester :</td>
        <td>##ticket.authors##</td>
    </tr>
    <tr>
        <td style="text-align:right; font-weight:bold; width:15%;">Status :</td>
        <td>##ticket.status##</td>
    </tr>
    <tr>
        <td style="text-align:right; font-weight:bold; width:15%;">Category :</td>
        <td>##ticket.category##</td>
    </tr>
    <tr>
        <td style="text-align:right; font-weight:bold; width:15%;">Opened :</td>
        <td>##ticket.creationdate##</td>
    </tr>
    ##IFticket.storestatus=closed##
    <tr>
        <td style="text-align:right; font-weight:bold; width:15%;">Closed :</td>
        <td>##ticket.closedate##</td>
    </tr>
    ##ENDIFticket.storestatus##
    ##IFticket.storestatus=assign##
    <tr>
        <td style="text-align:right; font-weight:bold; width:15%;">Assigned To :</td>
        <td>##ticket.assigntousers##</td>
    </tr>
    ##ENDIFticket.storestatus##
    <tr>
        <td style="text-align:right; font-weight:bold; width:15%;">Description :</td>
        <td>##ticket.description##</td>
    </tr>
    <tr style="background-color:#045E92">
        <td colspan="2" style="font-weight:bold; color:#FFFFFF;">Follow-up (##ticket.numberoffollowups##), Task (##ticket.numberoftasks##)</td>
    </tr>
    ##FOREACHfollowups##
    <tr>
        <td style="text-align:right; font-weight:bold; width:15%;">Follow Up <br /> ##followup.date## :</td>
        <td>##followup.description##</td>
    </tr>
    <tr>
        <td colspan="2" style="font-style:italic; text-align:right;">By ##followup.author##</td>
    </tr>
    ##ENDFOREACHfollowups##
    ##FOREACHtasks##
    <tr>
        <td style="text-align:right; font-weight:bold; width:15%;">Task <br /> ##task.date## :</td>
        <td>##task.description##</td>
    </tr>
    <tr>
        <td colspan="2" style="font-style:italic; text-align:right;">By ##task.author##<br /> Duration: ##task.time##</td>
    </tr>
    ##ENDFOREACHtasks##
    ##IFticket.storestatus=solved##
    <tr style="background-color:#045E92">
        <td colspan="2" style="font-weight:bold; color:#FFFFFF;">Solution</td>
    </tr>
    <tr>
        <td style="text-align:right; font-weight:bold; width:15%;">Solved - ##ticket.solvedate## :</td>
        <td>##ticket.solution.description##</td>
    </tr>
    ##ENDIFticket.storestatus##
</table>
Thank you,<br />
IT Department

For example:

##FOREACHtasks##
    <tr>
        <td style="text-align:right; font-weight:bold; width:15%;">Task <br /> ##task.date## :</td>
        <td>##task.description##</td>
    </tr>
    <tr>
        <td colspan="2" style="font-style:italic; text-align:right;">By ##task.author##<br /> Duration: ##task.time##</td>
    </tr>
    ##ENDFOREACHtasks##

while some other ##tags are working perfectly, but the part above still shows the tags

Offline

#2 2011-10-10 09:34:13

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,278

Re: Email Template

Version of GLPI used ?
Can you past result of your template ? (to know which tag doesn't work)


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#3 2011-10-10 09:50:52

kai891028
Member
Registered: 2011-03-07
Posts: 5

Re: Email Template

I'm using 0.80.2, the result

Hello NG HONG KAI,

This is a computer generated email, please do NOT reply to this email. Any email sent to noreply@lblgh.com will be automatically discarded.


test
Requester : NG HONG KAI
Status : Processing (assigned)
Category : 
Opened : 10-10-2011 14:10
Closed : 
Assigned To : NG HONG KAI
Description : testing t
Follow-up (3), Task (1)
Follow Up
##followup.date## : ##followup.description##
By ##followup.author##
Task
##task.date## : ##task.description##
By ##task.author##
Duration: ##task.time##
Solution
Solved - : 

Thank you,
IT Department

Last edited by kai891028 (2011-10-10 09:51:33)

Offline

#4 2011-10-10 11:00:49

remi
GLPI-DEV
From: Champagne
Registered: 2007-04-28
Posts: 7,127
Website

Re: Email Template

For which event ?
Can you please test in 0.80.4 which have a lot of bug fixes ?
Please post the "source" of the received message.


Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/

Offline

#5 2011-10-10 12:34:43

kai891028
Member
Registered: 2011-03-07
Posts: 5

Re: Email Template

I've updated to 0.80.4, it still won't work...  sad
So here's the source of the email message for new follow up.

--b1_994afd61b81cfc77454087b84aa14b48
Content-Type: text/plain; charset = "utf-8"
Content-Transfer-Encoding: 8bit

Hello NG HONG KAI,
 
 This is a computer generated email, please do NOT reply to this email. Any
email sent to noreply@lblgh.com will be automatically discarded.
 
 
 
 
 test 
 
 
 Requester : 
 NG HONG KAI 
 
 
 Status : 
 Processing (assigned) 
 
 
 Category : 
 
 
 
 Opened : 
 10-10-2011 14:10 
 
 
 Closed : 
 
 
 
 Assigned To : 
 NG HONG KAI 
 
 
 Description : 
 testing t 
 
 Follow-up (4), Task (1) 
 
 
 Follow Up 
 ##followup.date## : 
 ##followup.description## 
 
 
 By ##followup.author## 
 
 
 Task 
 ##task.date## : 
 ##task.description## 
 
 
 By ##task.author##
 Duration: ##task.time## 
 
 
 Solution 
 
 
 Solved - : 
 
 
 
 

Thank you,
 IT Department


--b1_994afd61b81cfc77454087b84aa14b48
Content-Type: text/html; charset = "utf-8"
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                        'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'><html>
                        <head>
                         <META http-equiv='Content-Type' content='text/html; charset=utf-8'>
                         <title>[GLPI #0001963] New ticket&#039;s follow-up - test</title>
                         <style type='text/css'>
                           
                         </style>
                        </head>
                        <body><p>Hello NG HONG KAI,<br /> <br />  This is a computer generated email, please do NOT reply to this email. Any email sent to noreply@lblgh.com will be automatically discarded.<br />   </p>
<table style="width: 100%;">
<tbody>
<tr style="background-color: #045e92;">
<td style="font-weight: bold; color: #ffffff;" colspan="2">test</td>
</tr>
<tr>
<td style="text-align: right; font-weight: bold; width: 15%;">Requester :</td>
<td>NG HONG KAI</td>
</tr>
<tr>
<td style="text-align: right; font-weight: bold; width: 15%;">Status :</td>
<td>Processing (assigned)</td>
</tr>
<tr>
<td style="text-align: right; font-weight: bold; width: 15%;">Category :</td>
<td></td>
</tr>
<tr>
<td style="text-align: right; font-weight: bold; width: 15%;">Opened :</td>
<td>10-10-2011 14:10</td>
</tr>
<tr>
<td style="text-align: right; font-weight: bold; width: 15%;">Closed :</td>
<td></td>
</tr>
<tr>
<td style="text-align: right; font-weight: bold; width: 15%;">Assigned To :</td>
<td>NG HONG KAI</td>
</tr>
<tr>
<td style="text-align: right; font-weight: bold; width: 15%;">Description :</td>
<td>testing t </td>
</tr>
<tr style="background-color: #045e92;">
<td style="font-weight: bold; color: #ffffff;" colspan="2">Follow-up (4), Task (1)</td>
</tr>
<tr>
<td style="text-align: right; font-weight: bold; width: 15%;">Follow Up <br /> ##followup.date## :</td>
<td>##followup.description##</td>
</tr>
<tr>
<td style="font-style: italic; text-align: right;" colspan="2">By ##followup.author##</td>
</tr>
<tr>
<td style="text-align: right; font-weight: bold; width: 15%;">Task <br /> ##task.date## :</td>
<td>##task.description##</td>
</tr>
<tr>
<td style="font-style: italic; text-align: right;" colspan="2">By ##task.author##<br /> Duration: ##task.time##</td>
</tr>
<tr style="background-color: #045e92;">
<td style="font-weight: bold; color: #ffffff;" colspan="2">Solution</td>
</tr>
<tr>
<td style="text-align: right; font-weight: bold; width: 15%;">Solved -  :</td>
<td></td>
</tr>
</tbody>
</table>
<p>Thank you,<br /> IT Department</p><br><br></body></html>



--b1_994afd61b81cfc77454087b84aa14b48--

Offline

#6 2011-10-19 18:37:38

michaelroman
Member
Registered: 2007-06-29
Posts: 21

Re: Email Template

Hello,

I'm using a 0.80.3 and I have the same issue. I noticed it's only with ##followup.xxx## and ##tasks.xxx## tags and I think it's the same issue for kai891028. If you have any idea... If I find something I will let you know.  Thanks smile

Offline

#7 2011-10-19 18:57:50

michaelroman
Member
Registered: 2007-06-29
Posts: 21

Re: Email Template

Hi, I found the solution. Actually it's maybe not a bug. Followup and Tasks tags are working in a "foreach" but it seems that it's working only in a TR. Here is a working code to show the writer of only the last ticket followup:

<tr class="tab_bg_1">
<td colspan="2">##FOREACH LAST followups## ##lang.followup.author##&#160;:</td>
<td colspan="2">##followup.author## ##ENDFOREACHfollowups##</td>
</tr>

Hope I've been helpful and thanks to the whole team involved in GLPI development for this great tool.

Last edited by michaelroman (2011-10-19 19:32:40)

Offline

#8 2023-03-03 11:13:24

hossamos
Member
Registered: 2023-02-25
Posts: 4

Re: Email Template

can you please display the path of this file because i want to make some changes in the email template

Offline

#9 2023-03-06 10:31:48

Jan 1977
Member
Registered: 2022-02-08
Posts: 16

Re: Email Template

Hello,

you can change e-mail templates in glpi -> setup -> notifications -> notifcations

Select the notification to change, then the template and the appropriate translation

Offline

Board footer

Powered by FluxBB