You are not logged in.
Pages: 1
Topic closed
Hello. Where i can find full list of all supported tags for email notifications?
If think list in the "Show all supported tags" in template translation page not actually full. There is no "IF" tags.
Or i can use this "IF" prefix with all availiable tags?
Have a nice day.
Debian Stretch + nginx 1.10.3 + php7.0-fpm
GLPI v9.3.1 + Reports, Behaviors, Forms
Offline
Ok. I can use IF,ENDIF etc. statements with any tags. It's good.
But with erference to this post http://forum.glpi-project.org/viewtopic … 93#p330593
Is the FOREACHLAST special prefix like IF etc.? Is there any list of all special prefixes.
And i have another trouble. Tags ##author.email##, ##user.phone## and same for mobile etc. wan't work in the my template. How i can debug this?
The whole construction with those tags looks like:
##IFauthor.mobile##<span style="some css">##lang.author.mobile##</span> : ##author.mobile## ##ENDIFauthor.mobile##
And it's always empty. Ofcouse those fields filled in user/author profiles.
Debian Stretch + nginx 1.10.3 + php7.0-fpm
GLPI v9.3.1 + Reports, Behaviors, Forms
Offline
Hi,
maybe you can help me
i'm looking for "order management" tags 'cause i want to include in notifications: quantity, equipment, manufactured,reference, type,model...
do you know something about this?
Offline
Hello Marcelo
I guess your problem is the "logical operator" if you use "and" all conditions must be match.
Try to change logical operator for "or"
Best Regards
Wanderlei
Offline
You have doc for that but not translated in English.
I explain with my poor English.
You have 3 king of tags:
- simple: to show a string or the value of a field (##reservation.end## to show tha date of the end of the reservation)
- condition (IF/ELSE/THEN): to test the value of a field. The syntax is ##IFfieldname## action for the IF ##ENDIFfieldname## ##ELSEfieldname## action for the ELSE ##ENDELSEfieldname##. ##IFticket.assigntouser## ... ##ENDIFticket.assigntouser## means if you have a technician assigned to the ticket.
You also can test the value of a field: ##IFticket.storestatus=5## means is status of the ticket is Closed
- loops (FOREACH): to list a part of a dropdown list
* first item: ##FOREACH FIRST followups## ... ##ENDFOREACH followups## => show only the first followup created in the ticket
* last item: ##FOREACH LAST followups## ... ##ENDFOREACH followups##
* 10 first items : ##FOREACH FIRST 10 followups## ... ##ENDFOREACH followups##
* 2 last items : ##FOREACH LAST 2 followups## ... ##ENDFOREACH followups##
You can have a FOREACH in a FOREACH but you can't have an IF in a FOREACH
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
yllen, thank you very much, your help is very useful, as always.
But i have another trouble. I made template like this:
<div id="author-box">
<span id="light-text"> ##lang.ticket.authors##</span> : ##IFticket.authors## ##ticket.authors## ##ENDIFticket.authors## ##ELSEticket.authors##--##ENDELSEticket.authors## <br />
##IFauthor.email##
<span id="light-text">##lang.author.email##</span> : ##author.email##<br />
##ENDIFauthor.email##
##IFauthor.phone##
<span id="light-text">##lang.author.phone##</span> : ##author.phone##<br />
##ENDIFauthor.phone##
##IFauthor.mobile##
<span id="light-text">##lang.author.mobile##</span> : ##author.mobile##
##ENDIFauthor.mobile##
</div>
But email, phone, mobile is always empty, even if the requester have those fields filled. As empty i mean there is no line at all, not only value.
So on the email notification I have only one line "Requesters: User Name"
Can you help me with that? Thank you.
Last edited by freewood (2017-04-06 10:48:32)
Debian Stretch + nginx 1.10.3 + php7.0-fpm
GLPI v9.3.1 + Reports, Behaviors, Forms
Offline
Any help appreciated )
Debian Stretch + nginx 1.10.3 + php7.0-fpm
GLPI v9.3.1 + Reports, Behaviors, Forms
Offline
On the fresh installation of GLPI i have the same problem. I think there is a misstake in notification template, but can't find where it is.
My problem is, tags like "##lang.author.email##" doesn't work, it's always empty in notification emails.
Debian Stretch + nginx 1.10.3 + php7.0-fpm
GLPI v9.3.1 + Reports, Behaviors, Forms
Offline
I have no problem.
Tags of my test:
##FOREACHauthors##
Requester: ##ticket.authors##
Email : ##author.email##
Phone: ##author.phone##
Mobile: ##author.mobile##
##ENDFOREACHauthors##
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
The key was ##FOREACH... statement. Thank you again.
Debian Stretch + nginx 1.10.3 + php7.0-fpm
GLPI v9.3.1 + Reports, Behaviors, Forms
Offline
Pages: 1
Topic closed