Skip Menu |

This queue is for tickets about the RT-Extension-TimeTracking-Automatic CPAN distribution.

Report information
The Basics
Id: 128199
Status: new
Priority: 0/
Queue: RT-Extension-TimeTracking-Automatic

People
Owner: Nobody in particular
Requestors: ktm [...] rice.edu
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Extremely large values being generated for TimeWorked
Date: Tue, 8 Jan 2019 13:40:16 -0600
To: bug-RT-Extension-TimeTracking-Automatic [...] rt.cpan.org
From: Kenneth Marshall <ktm [...] rice.edu>
Hi, Since enabling the extension RT::Extension::TimeTracking::Automatic we have had cases of extremely large values of TimeWorked being generated. The latest case was a brand new ticket that I submitted. Here is the history: ------------------------------------------------------------ Tue, Jan 8, 2019 12:53:02 PM ktm (Marshall, Kenneth) - Worked 429,715 hours (25,782,899 minutes) 25,782,899 minutes Tue, Jan 8, 2019 12:52:39 PM The RT System itself - AdminCc aaa (A, A) added Tue, Jan 8, 2019 12:52:39 PM The RT System itself - Due changed from Not set to Not set Tue, Jan 8, 2019 12:52:38 PM ktm (Marshall, Kenneth) - Ticket created Subject: testing notifications for OTR Fees Date: Tue, 8 Jan 2019 12:52:26 -0600 To: rt@help.rice.edu From: "Kenneth Marshall" <ktm@rice.edu> Download (untitled) / with headers text/plain 44B This is test. Please ignore. Regards, Ken ------------------------------------------------------------ It looks like something may not be being initialized to 0 correctly or something similar. Needlesstosay it seriously hampers our time managment processes so anything you can do to help would be appreciated. Please let me know if you need any addition information or diagnostics? Regards, Ken Marshall
Subject: Re: [rt.cpan.org #128199] Another example of large updates
Date: Tue, 8 Jan 2019 16:07:19 -0600
To: Bugs in RT-Extension-TimeTracking-Automatic via RT <bug-RT-Extension-TimeTracking-Automatic [...] rt.cpan.org>
From: Kenneth Marshall <ktm [...] rice.edu>
Show quoted text
> > It looks like something may not be being initialized to 0 correctly > or something similar. Needlesstosay it seriously hampers our time > managment processes so anything you can do to help would be appreciated. > Please let me know if you need any addition information or diagnostics? > > Regards, > Ken Marshall
Hi, I have looked a little bit further and here is another case where the timeworked is set incorrectly: --------------------------------------------------------------------- # Tue, Jan 8, 2019 7:53:18 AM kr (K, H) - Status changed from 'stalled' to 'open' # Tue, Jan 8, 2019 7:53:18 AM kr (K, H) - Worked 429,710 hours (25,782,599 minutes) 25,782,599 minutes # Thu, Dec 13, 2018 12:54:11 PM kr (K, H) - Status changed from 'open' to 'stalled' # Thu, Dec 13, 2018 12:54:11 PM kr (K, H) - Worked 6 minutes 6 minutes # Wed, Dec 12, 2018 11:27:28 AM The RT System itself - Outgoing email recorded [Show] # Wed, Dec 12, 2018 11:27:27 AM kr (K, H) - Correspondence added [Reply] [Comment] [Forward] Subject: RE: [rice.edu #802475] Resolved: Need New Department Laptop Date: Wed, 12 Dec 2018 11:27:15 -0600 To: "IT Help" <helpdesk@help.rice.edu> From: "H K" <kr@rice.edu> Download (untitled) / with headers text/plain 1.2KiB Download (untitled) / with headers text/html 3.9KiB Okay. Sent from my Windows 10 device --------------------------------------------------------------------- Here are the messages in the logs: Jan 8 07:53:18 rt2 RT: [10453] Use of uninitialized value in subtraction (-) at /opt/rt442/local/plugins/RT-Extension-TimeTracking-Automatic/html/Callbacks/RT-Extension-TimeTracking-Automatic/Ticket/Update.html/BeforeDisplay line 7. Jan 8 12:53:02 rt2 RT: [6715] Use of uninitialized value in subtraction (-) at /opt/rt442/local/plugins/RT-Extension-TimeTracking-Automatic/html/Callbacks/RT-Extension-TimeTracking-Automatic/Ticket/Update.html/BeforeDisplay line 7. Regards, Ken
Subject: Re: [rt.cpan.org #128199] A patch for the problem
Date: Mon, 14 Jan 2019 08:59:49 -0600
To: Bugs in RT-Extension-TimeTracking-Automatic via RT <bug-RT-Extension-TimeTracking-Automatic [...] rt.cpan.org>
From: Kenneth Marshall <ktm [...] rice.edu>
Show quoted text
> --------------------------------------------------------------------- > > Here are the messages in the logs: > > Jan 8 07:53:18 rt2 RT: [10453] Use of uninitialized value in > subtraction (-) at > /opt/rt442/local/plugins/RT-Extension-TimeTracking-Automatic/html/Callbacks/RT-Extension-TimeTracking-Automatic/Ticket/Update.html/BeforeDisplay > line 7. > Jan 8 12:53:02 rt2 RT: [6715] Use of uninitialized value in subtraction > (-) at > /opt/rt442/local/plugins/RT-Extension-TimeTracking-Automatic/html/Callbacks/RT-Extension-TimeTracking-Automatic/Ticket/Update.html/BeforeDisplay > line 7. > > > Regards, > Ken
Hi, I have applied the following patch to use a default value of 'time' in the case that the variable is not defined. Here is the diff for the file: --- BeforeDisplay.ORIG 2019-01-10 13:53:56.590980382 -0600 +++ BeforeDisplay 2019-01-10 13:53:56.581980493 -0600 @@ -4,6 +4,6 @@ </%args> <%init> my $adjustment = RT->Config->Get("TimeTrackingAdjustment") || 0; -my $worked = POSIX::ceil((time - $$ARGSRef{TimeTrackingAutomatic})/60) + $adjustment; # at least 1 minute +my $worked = POSIX::ceil((time - ($$ARGSRef{TimeTrackingAutomatic} // time))/60) + $adjustment; # at least 1 minute $Ticket->SetTimeWorked( $worked + $Ticket->TimeWorked ); </%init> That appears to have fixed the errors and the population of TimeWorked with ridiculous values. Regards, Ken
Subject: Re: [rt.cpan.org #128199] A patch for the problem
Date: Mon, 8 Jun 2020 14:41:44 -0500
To: Bugs in RT-Extension-TimeTracking-Automatic via RT <bug-RT-Extension-TimeTracking-Automatic [...] rt.cpan.org>
From: Kenneth Marshall <ktm [...] rice.edu>
Show quoted text
> Hi, > > I have applied the following patch to use a default value of 'time' in > the case that the variable is not defined. Here is the diff for the > file: > > --- BeforeDisplay.ORIG 2019-01-10 13:53:56.590980382 -0600 > +++ BeforeDisplay 2019-01-10 13:53:56.581980493 -0600 > @@ -4,6 +4,6 @@ > </%args> > <%init> > my $adjustment = RT->Config->Get("TimeTrackingAdjustment") || 0; > -my $worked = POSIX::ceil((time - $$ARGSRef{TimeTrackingAutomatic})/60) + $adjustment; # at least 1 minute > +my $worked = POSIX::ceil((time - ($$ARGSRef{TimeTrackingAutomatic} // time))/60) + $adjustment; # at least 1 minute > $Ticket->SetTimeWorked( $worked + $Ticket->TimeWorked ); > </%init> > > That appears to have fixed the errors and the population of TimeWorked > with ridiculous values. > > Regards, > Ken
Hi Devteam, I just upgrade RT to 4.4.4 and got burned again by this bug. Could someone please release a fixed version of this extension. Thank you. Regards, Ken