Bug 17299 - Date due shows incorrect time on SCO.
Summary: Date due shows incorrect time on SCO.
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Self checkout (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-13 21:31 UTC by Barton Chittenden
Modified: 2017-12-07 22:16 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 17299: Display date due correctly on SCO (1.37 KB, patch)
2016-09-14 12:29 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 17299: Display date due correctly on SCO (1.44 KB, patch)
2016-09-14 13:47 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 17299: Display date due correctly on SCO (1.50 KB, patch)
2016-09-15 13:23 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Barton Chittenden 2016-09-13 21:31:26 UTC
For non-hourly loans, date due will by YYYY-MM-DD 23:59:00

Assuming date format MM/DD/YYYY, the date due under the self-checkout should appear as MM/DD/YYYY 11:59:00 PM (Timeformat: 12 hour) or MM/DD/YYYY 23:59:00 (Timeformat 24H).

Instead it is showing as either

   MM/DD/YYYY 12:00 AM (Timeformat: 12 hour)
or MM/DD/YYYY 00:00    (Timeformat: 24H)

Steps to reproduce:

1/ Enable WebBasedSelfCheck syspref
2/ Check out an item to User A -- Do not use an hourly loan.
3/ Log in to Koha self check ( {OPAC URL}/cgi-bin/koha/sco/sco-main.pl).
4/ Enter User A's cardnumber.

See that Checkouts are

   MM/DD/YYYY 12:00 AM (Timeformat: 12 hour)
or MM/DD/YYYY 00:00    (Timeformat: 24H)
Comment 1 Jonathan Druart 2016-09-14 12:29:59 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2016-09-14 13:47:08 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall 2016-09-15 13:23:24 UTC
Created attachment 55584 [details] [review]
Bug 17299: Display date due correctly on SCO

Unless it's an hourly loan, date due should not display the time part
(23:59).
Because of bad code in GetPendingIssues, date_due is replaced with a
DateTime object and is copied into date_due_sql.
We need to use this date_due_sql to correctly display the date due in
the sco module.

Test plan:
1/ Enable WebBasedSelfCheck syspref
2/ Check out an item to User A -- Do not use an hourly loan.
3/ Log in to Koha self check ( {OPAC URL}/cgi-bin/koha/sco/sco-main.pl).
4/ Enter User A's cardnumber.
Without this patch, checkouts are
   MM/DD/YYYY 12:00 AM (Timeformat: 12 hour)
or MM/DD/YYYY 00:00    (Timeformat: 24H)
With this patch applied, only the date is displayed

Followed test plan, works as expected.
Signed-off-by: Marc <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 4 Kyle M Hall 2016-09-15 13:24:00 UTC
Pushed to master for 16.11, thanks Jonathan!
Comment 5 Barton Chittenden 2016-09-15 13:48:28 UTC
(In reply to Kyle M Hall from comment #4)
> Pushed to master for 16.11, thanks Jonathan!

I would definitely like to see this back-ported -- as far as I can tell, it's a one line fix with no dependencies, and the bug causes Koha to give incorrect information to patrons.