RotherOSS / otobo

OTOBO is one of the most flexible web-based ticketing systems used for Customer Service, Help Desk, IT Service Management. https://otobo.io/
GNU General Public License v3.0
263 stars 75 forks source link

[BUG] Incorrect calculation of SolutionInMin in statistics #3897

Open StefanRother-OTOBO opened 3 weeks ago

StefanRother-OTOBO commented 3 weeks ago

Environment

Expected behavior

In dynamic statistics of the type ‘TicketList’, the SolutionInMin (time in minutes from the opening of the ticket until the status change to a status of the type closed) should be displayed.

Actual behavior

In dynamic statistics of the type ‘TicketList’, the SolutionInMin (time in minutes from the opening of the ticket to the status change to a status of the type closed) is not calculated correctly. In the file Kernel/System/Ticket.pm, the method TicketWorkingTimeSuspendCalculate exists, which is called in line 8249 for the calculation. Here, the history is run through and all status changes are used for the calculation. However, the first run is not calculated correctly and always results in 0, even if this is not the case. Therefore, the first status change is not correctly included in the calculation in the output (for example, ‘new’ to ‘open’).

How to reproduce

Steps to reproduce the behavior:

1.) Add a new stats from type "TicketList" and add "SolutionInMin" to the output. 2.) Recalculate the given minutes.

svenoe commented 1 week ago

Please test this for 11.0, but implement for the lowest affected version and change the milestone appropriately.