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 2010-05-07 21:12:25

treydock
Member
Registered: 2009-02-26
Posts: 42

Limit number of followups in email template - 0.78

First, the GLPI developers have done an AMAZING job with the release 0.78.  I actually had been making modifications which are now introduced, and their fixes work MUCH better than mine.

Now to the issue.  I've been testing the notification templates and have noticed that there is no way to do just ##followup.date##.  If I understand correctly the only way to list follow-ups in a template is to use the ##FOREACHfollowups## tags.  Unfortunately the custom template I created for my 0.72 install only shows the most recent follow-up at the top of the email.  I've noticed on the forge wiki this was brought up...of course had to use translators https://forge.indepnet.net/projects/glp … platesTags .  Having a way to show a specific number like ##FORNfollowups## would be most useful.

Is there a more up-to-date revision that has this change or any tips on how I can make it myself?  I'm on revision 11442.

Thanks!
- Trey


Live Instance >> CentOS 5.6 x64 | Apache-2.2.3 | PHP-5.1.6 | MySQL-5.0.77 | Kernel 2.6.18-194.el5 | GLPI v0.80.2 | OCS 2.0RC3 (~500 units)
Dev Server >> Same as above

Offline

#2 2010-05-08 07:27:25

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

Re: Limit number of followups in email template - 0.78

You should use

##FOREACH FIRST 5 followups## ...  ##ENDFOREACHfollowups##

or

##FOREACH LAST 5 followups## ...  ##ENDFOREACHfollowups##

+


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

#3 2010-05-11 02:27:22

treydock
Member
Registered: 2009-02-26
Posts: 42

Re: Limit number of followups in email template - 0.78

Thank you!  Using those commands worked perfectly.


Live Instance >> CentOS 5.6 x64 | Apache-2.2.3 | PHP-5.1.6 | MySQL-5.0.77 | Kernel 2.6.18-194.el5 | GLPI v0.80.2 | OCS 2.0RC3 (~500 units)
Dev Server >> Same as above

Offline

#4 2010-10-13 16:27:46

VHA
Member
Registered: 2010-10-11
Posts: 3

Re: Limit number of followups in email template - 0.78

What string should be use to only send the CURRENT Follow-up ?

Offline

#5 2010-10-13 16:47:09

wawa
GLPI-DEV
From: Montpellier / France
Registered: 2006-07-03
Posts: 6,019
Website

Re: Limit number of followups in email template - 0.78

try ##FOREACH LAST followups## ...  ##ENDFOREACHfollowups##

Offline

#6 2010-10-14 17:39:44

VHA
Member
Registered: 2010-10-11
Posts: 3

Re: Limit number of followups in email template - 0.78

OK, This works for the NEW FOLLOWUP and UPDATE FOLLOWUP messages. Now for the DELETION FOLLOWUP won work 100%.
I have three followup(1,2,3) Say i delete the followup number 2, the message will show the number 3 Followup message.

I like to delete Follow up number 2 and have the user receive a note that number 2 has been deleted.

Offline

#7 2010-11-04 17:34:20

treydock
Member
Registered: 2009-02-26
Posts: 42

Re: Limit number of followups in email template - 0.78

Are there IF ELSE IF type condition statements available for the notification templates in 0.78?  I have done it before when testing the early development version of 0.78, but for the life of me can't find any documentation on this.  I was able to basically say "IF private = yes then print Private Yes" , which only showed the private string if the follow-up was private.

Thanks
- Trey


Live Instance >> CentOS 5.6 x64 | Apache-2.2.3 | PHP-5.1.6 | MySQL-5.0.77 | Kernel 2.6.18-194.el5 | GLPI v0.80.2 | OCS 2.0RC3 (~500 units)
Dev Server >> Same as above

Offline

#8 2010-11-04 19:10:09

sean.tapscott
Member
Registered: 2010-06-16
Posts: 303

Re: Limit number of followups in email template - 0.78

Have you looked at the default notification templates?  There are if else statements all over the place.

##IFticket.storestatus=solved##
 ##lang.ticket.url## : ##ticket.urlapprove##
 ##lang.ticket.autoclosewarning##
 ##lang.ticket.solvedate## : ##ticket.solvedate##
 ##lang.ticket.solution.type## : ##ticket.solution.type##
 ##lang.ticket.solution.description## : ##ticket.solution.description## ##ENDIFticket.storestatus##
 ##ELSEticket.storestatus## ##lang.ticket.url## : ##ticket.url## ##ENDELSEticket.storestatus##

Now using 0.78.1 on CentOS.

Offline

Board footer

Powered by FluxBB