Bug 8043 - today's checkouts are in Previous checkouts in circulation.pl
Summary: today's checkouts are in Previous checkouts in circulation.pl
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: 3.8
Hardware: All All
: P3 normal (vote)
Assignee: Kyle M Hall
QA Contact: Marcel de Rooy
URL:
Keywords:
: 7925 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-05-04 10:10 UTC by stephane.delaune
Modified: 2013-12-05 19:59 UTC (History)
9 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
proposed patch (1.05 KB, patch)
2012-05-04 10:15 UTC, stephane.delaune
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 8043: today's checkouts are in Previous checkouts in circulation.pl (1.12 KB, patch)
2012-05-08 13:12 UTC, Nicole C. Engard
Details | Diff | Splinter Review
Bug 8043 - today's checkouts are in Previous checkouts in circulation.pl (1.07 KB, patch)
2012-06-01 19:04 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 8043 - today's checkouts are in Previous checkouts in circulation.pl (1022 bytes, patch)
2012-06-14 10:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 8043 - today's checkouts are in Previous checkouts in circulation.pl (1.07 KB, patch)
2012-06-14 11:56 UTC, Nicole C. Engard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description stephane.delaune 2012-05-04 10:10:50 UTC
for a borrower, if you add a new checkout, it appears after Previous checkouts (cgi-bin/koha/circ/circulation.pl?borrowernumber=123) instead of before.
Verification of today's checkouts is made ​​between iso's date (e.g. 2012-05-04) and iso's date+time (e.g. 2012-05-04T10:31:00)
Comment 1 stephane.delaune 2012-05-04 10:15:14 UTC Comment hidden (obsolete)
Comment 2 Nicole C. Engard 2012-05-08 13:12:46 UTC Comment hidden (obsolete)
Comment 3 Jared Camins-Esakov 2012-05-12 14:19:39 UTC
It looks to me like this was signed off. Marking the bug as such.
Comment 4 Jonathan Druart 2012-05-22 08:27:14 UTC
QA comments:

I think it is better to compare 
  C4::Dates->new($it->{issuedate}, 'iso')->output('iso')
and
  $todaysdate ( = C4::Dates->new->output('iso'))

rather than an obscured substr
Comment 5 Kyle M Hall 2012-06-01 19:04:19 UTC Comment hidden (obsolete)
Comment 6 Chris Cormack 2012-06-01 20:35:28 UTC
Hmm I think the plan is to slowly kill C4::Dates, because it doesnt understand times at all.

I am not sure on that, so will check but I think that was the plan
Comment 7 Nicole C. Engard 2012-06-06 10:09:01 UTC
*** Bug 7925 has been marked as a duplicate of this bug. ***
Comment 8 Nicole C. Engard 2012-06-06 10:09:28 UTC
Just a note from the other bug report:

On the checkout summary it used to split today's checkouts and previous checkouts: http://manual.koha-community.org/3.6/en/images/circ/checkoutsummary.png
Comment 9 Sophie MEYNIEUX 2012-06-09 11:13:22 UTC
A simple solution could be to only get date in sql request :
SELECT DATE(issuedate), DATE(date_due), ...
But if all thoses columns are now Datetime, I suppose that's because we need the time somewhere (I didn't see where).

If C4::Dates should be abandonned, we could use DateTime module and truncate date variables to day before comparison where we don't need time.

I think some kind of global best practice should be written to handle date and time consistantly.
Comment 10 Chris Cormack 2012-06-09 11:17:27 UTC
(In reply to comment #9)
> A simple solution could be to only get date in sql request :
> SELECT DATE(issuedate), DATE(date_due), ...
> But if all thoses columns are now Datetime, I suppose that's because we need
> the time somewhere (I didn't see where).
> 
In circulation now, you can specify hourly loans, so times are used for calculating overdues etc.

> If C4::Dates should be abandonned, we could use DateTime module and truncate
> date variables to day before comparison where we don't need time.
> 
> I think some kind of global best practice should be written to handle date
> and time consistantly.

Definitely
Comment 11 Kyle M Hall 2012-06-14 10:33:54 UTC Comment hidden (obsolete)
Comment 12 Nicole C. Engard 2012-06-14 11:56:56 UTC
Created attachment 10277 [details] [review]
[SIGNED-OFF] Bug 8043 - today's checkouts are in Previous checkouts in circulation.pl

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Comment 13 Nicole C. Engard 2012-06-14 12:11:15 UTC
The one problem here is related to bug 7444 and that's that the time has been removed.  The timestamp was there because of hourly loans and needs to be there.
Comment 14 Katrin Fischer 2012-06-17 05:52:43 UTC
Switching this to "Signed off", because of Nicole's comment and attached patch.
Comment 15 Marcel de Rooy 2012-06-20 11:17:02 UTC
QA Comment:
While waiting for more spectacular improvements on dates/datetimes in Koha, this simple fix works: e.g. 2012-06-20 13:00 gt 2012-06-20 in order to get today's issues.
Passed QA
Comment 16 Chris Cormack 2012-06-23 19:19:15 UTC
Pushed to 3.8.x, will be in 3.8.3.