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 2023-10-24 12:44:41

MasinAD
Member
Registered: 2023-10-24
Posts: 13

[solved] Notification templates and conditionals

Hello,

if I understand the code in src/NotificationTemplate.php and the output of my attempt of a "greater than" comparison correctly, the ##IF conditionals in GLPI's notification templates do not allow

##IFticket.numberofitems>0##

Am I correct?

Bests,
Masin

Last edited by MasinAD (2023-11-10 16:50:06)

Offline

#2 2023-10-24 20:23:57

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,813
Website

Re: [solved] Notification templates and conditionals

Yes. Your only options are checking if a tag has any value set or a specific value.


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

#3 2023-11-10 15:30:01

MasinAD
Member
Registered: 2023-10-24
Posts: 13

Re: [solved] Notification templates and conditionals

Thanks for the confirmation. I worked around by

##IFticket.numberofitems=0## ##ENDIFticketnumberofitems## ##ELSEticketnumberofitems## do stuff ##ENDELSEticketnumberofitems##

Offline

Board footer

Powered by FluxBB