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-11-02 11:46:39

ilbicelli
Member
Registered: 2022-11-21
Posts: 15

Display Ticket duration in hours in email notification

Hello,
I'm setting up notifications and I'd like to display ticket duration in hours.
Now I'm using variable ##ticket.time##, which looks like the sum of duration of all tasks.
But if in the ticket there are 3 tasks, two of 10 hours and one of four hours ##ticket.time## renders 1 day 4 hours.

Is there a way to display such interval in hours or I have to modify the source code?

Cheers!

Offline

#2 2023-11-03 00:40:32

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

Re: Display Ticket duration in hours in email notification

This information cannot be formatted in another way currently.


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-06 12:32:19

ilbicelli
Member
Registered: 2022-11-21
Posts: 15

Re: Display Ticket duration in hours in email notification

Strangely I can't find reference of ##ticket.time## in the source code (I forked the bugfix branch)

Offline

#4 2023-11-07 00:55:33

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

Re: Display Ticket duration in hours in email notification

It is in "src/NotificationTargetCommonITILObject.php" as "##$objettype.time##".


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

Board footer

Powered by FluxBB