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 2024-07-22 13:38:15

valentind
Member
Registered: 2018-03-29
Posts: 3

IF ENDIF ESLE unexpected behaviour

Hi everyone,
The logical operators for the templates seemed pretty straight forward but I am currently having trouble understanding the following:
For this:
##IFticket.storestatus=5##
var a             
##ENDIFticket.storestatus## 
##ELSEticket.storestatus##
var b                     
##ENDELSEticket.storestatus##

On a new ticket (status 1) it prints:  var b

But if I change 5 to 1, like this:
##IFticket.storestatus=1##
var a             
##ENDIFticket.storestatus## 
##ELSEticket.storestatus## var b                     
##ENDELSEticket.storestatus##

on a new ticket (status 1) it prints: var a var b


I would expect "var b" to not be printed when status=1, because  the IF condition has already been met.
Anybody has any idea why is this happening?
GLPI 10.0.7

Last edited by valentind (2024-07-22 14:28:00)

Offline

Board footer

Powered by FluxBB