You are not logged in.
Pages: 1
Hello,
How could one loop trough ticket assignees and only show the first element of this array?
I would like to create a template that will include a signature. But if the ticket is assigned to more than one techician I only want the first technician to be included in the signature.
{% for user in ticket.assignees.users %}
{{ user.fullname }}
{{ user.usertitle.name }}
Tél. : {{ user.phone }}
GSM : {{ user.mobile }}
{% endfor %}
Do you have any idea on how to do this please?
Docs only show "old" syntax ##FOREACH and I can't manage to make it work with ##FOREACH FIRST 1 USERS##.
Thank you in advance
Offline
Which templates are you referring to? Notifications still use the custom syntax you reference with tags like "##FOREACH".
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
Notification templates. Ok, is this the right syntax? ##FOREACH FIRST 1 USERS## ?
Thank you
Offline
Pages: 1