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 2017-08-03 21:32:41

mercfate
Member
Registered: 2017-02-25
Posts: 11

Sum duration of tasks

How can i sum the duration of all tasks on a ticket (glpi internal, plugin, report)?

For eg.
Ticket 1

Task 1 - 1 hour
Task 2 - 1 hour
task 3 - 30 minutes

Total 2 hours and 30 minutes

I need to send to a customer the total of hours used by all tickets opened by them.

It is possible sum of each entity?



Thanks in advance

Last edited by mercfate (2017-08-03 21:43:13)

Offline

#2 2017-08-04 08:28:42

freewood
Member
From: Moscow
Registered: 2016-01-30
Posts: 116

Re: Sum duration of tasks

We are use custom reports to solve this: https://forge.glpi-project.org/projects/reports


Debian Stretch + nginx 1.10.3 + php7.0-fpm
GLPI v9.3.1 + Reports, Behaviors, Forms

Offline

#3 2017-08-04 14:28:14

KKAdmin
Member
From: Germany
Registered: 2010-03-05
Posts: 959

Re: Sum duration of tasks

I'm also interested in this. Can you share this custom report ?


You can mark this threat as [resolved] in subject of your threat. (This is only available edit of the first post.) It is good for users who help others to quickly see which post is still open.
##############################################
GLPI 9.3.3

Offline

#4 2017-08-04 15:05:50

freewood
Member
From: Moscow
Registered: 2016-01-30
Posts: 116

Re: Sum duration of tasks

I'm not a php/sql senior (not even junior) smile, so this is just a copy of a builtin reports from plugin. I've just change the sql request and criteria fields.
There is a code of a report: https://pastebin.com/14KcNQkR
It's allow to choose date (which based on task date, not ticket) and choose entity.
It's also contains those fields:
Ticket Name
Open date (of ticket)
Requester
Ticket descr. - description field of a ticket
Solve date
Solution
Actual time spend - sum of a time of all tasks in a ticket


The reports plugin is very useful, actually you can easily create your own reports.

Last edited by freewood (2017-08-04 15:06:04)


Debian Stretch + nginx 1.10.3 + php7.0-fpm
GLPI v9.3.1 + Reports, Behaviors, Forms

Offline

#5 2017-08-15 22:24:23

mercfate
Member
Registered: 2017-02-25
Posts: 11

Re: Sum duration of tasks

I found a solution to this problem using the Dashboard plugin.

Just go on reports > tasks > entities

This report shows the total time for each ticket and on top total time for selected entity.

Thanks a lot for all your help.

Offline

Board footer

Powered by FluxBB