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
Guest
Registered: 2017-02-25
Posts: 10

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
Guest
From: Moscow
Registered: 2016-01-30
Posts: 115

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.1.6 + Reports, OCS, Browser notifications, Behaviors, Forms

Offline

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

KKAdmin
Guest
From: Germany
Registered: 2010-03-05
Posts: 500

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.1.2 /Ubuntu 14.04.4 LTS
Apache/2.4.7 (Ubuntu) - PHP 5.5.9-1ubuntu4.16 - MySQL: 5.5.49-0ubuntu0.14.04.1

Offline

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

freewood
Guest
From: Moscow
Registered: 2016-01-30
Posts: 115

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.1.6 + Reports, OCS, Browser notifications, Behaviors, Forms

Offline

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

mercfate
Guest
Registered: 2017-02-25
Posts: 10

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