[Bug 9723] New: Hourly loans don't show time due in OPAC
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9723 Bug ID: 9723 Summary: Hourly loans don't show time due in OPAC Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Self checkout Assignee: koha-bugs@lists.koha-community.org Reporter: kyle@bywatersolutions.com The time an item is due does not display on the patron's record in the OPAC. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9723 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Component|Self checkout |OPAC Assignee|koha-bugs@lists.koha-commun |oleonard@myacpl.org |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9723 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9723 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 27551 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=27551&action=edit Bug 9723 - Hourly loans don't show time due in OPAC Due dates in the OPAC don't display the time items are due, and thus items which are on hourly loans don't display an accurate due date and time. This patch corrects this by adding the "with_hours => 1" parameter. To test, enable an hourly loan period for an itemtype in your collection. View the display of date due on the following pages: - Patron details (opac-user.pl) - Log into the OPAC as a user who has something checked out which circulates by the hour. - Bibliographic details (opac-detail.pl) - View the details for an item which is circulates by the hour and is checked out. - Course reserves details (opac-course-details.pl) - View the contents of a course reserve, one of which should be an item which circulates by the hour and is checked out. All due dates should show both date and time and be formatted correctly. Test in both prog and Bootstrap themes. This solution is less than ideal for libraries who do not use hourly loans, as the time information is useless and potentially confusing. It's problematic even for libraries who do use hourly loans, since probably not all loans are hourly. However, without doing a check of each item's circulation policy every time we display the due date I don't know how you can tell it's an hourly loan. Assume that items due at 23:59 are non-hourly? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9723 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gmcharlt@gmail.com --- Comment #2 from Galen Charlton <gmcharlt@gmail.com> --- (In reply to Owen Leonard from comment #1)
However, without doing a check of each item's circulation policy every time we display the due date I don't know how you can tell it's an hourly loan. Assume that items due at 23:59 are non-hourly?
See bug 11148. The new 'as_due_date' option could be added to the KohaDates TT filter as well, and it does indeed assume that any loans that are due at a time other than 23:59 are hourly. That way, there would be no way to clutter up the due date display for daily loans. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9723 --- Comment #3 from Galen Charlton <gmcharlt@gmail.com> --- The following diff shows how the TT filter might be updated to add a as_due_date option: diff --git a/Koha/Template/Plugin/KohaDates.pm b/Koha/Template/Plugin/KohaDates.pm index 134712f..37d03af 100644 --- a/Koha/Template/Plugin/KohaDates.pm +++ b/Koha/Template/Plugin/KohaDates.pm @@ -30,7 +30,9 @@ sub filter { return "" unless $text; $config->{with_hours} //= 0; my $dt = dt_from_string( $text, 'iso' ); - return output_pref({ dt => $dt, dateonly => !$config->{with_hours} }); + return $config->{as_due_date} ? + output_pref({ dt => $dt, as_due_date => 1 }) : + output_pref({ dt => $dt, dateonly => !$config->{with_hours} }); } 1; -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9723 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #27551|0 |1 is obsolete| | --- Comment #4 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 27555 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=27555&action=edit Bug 9723 - Hourly loans don't show time due in OPAC Due dates in the OPAC don't display the time items are due, and thus items which are on hourly loans don't display an accurate due date and time. This patch corrects this by adding (and using) a new "as_due_date" option to the KohaDates plugin made possible by Bug 11148. Thanks to Galen for providing the changes to KohaDates.pm. To test, enable an hourly loan period for an itemtype in your collection. View the display of date due on the following pages: - Patron details (opac-user.pl) - Log into the OPAC as a user who has something checked out which circulates by the hour. - Bibliographic details (opac-detail.pl) - View the details for an item which is circulates by the hour and is checked out. - Course reserves details (opac-course-details.pl) - View the contents of a course reserve, one of which should be an item which circulates by the hour and is checked out. Due dates for hourly items should show both date and time and be formatted correctly. Due dates for non-hourly loans should show only the date. Test in both prog and Bootstrap themes. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9723 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |9724 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9723 sandboxes@biblibre.com <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |sandboxes@biblibre.com --- Comment #5 from sandboxes@biblibre.com <sandboxes@biblibre.com> --- Patch tested with a sandbox, by Aleisha <aleishaamohia@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9723 sandboxes@biblibre.com <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #27555|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9723 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #27555|1 |0 is obsolete| | CC| |jonathan.druart@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9723 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #27555|0 |1 is obsolete| | --- Comment #6 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 27959 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=27959&action=edit Bug 9723 - Hourly loans don't show time due in OPAC Due dates in the OPAC don't display the time items are due, and thus items which are on hourly loans don't display an accurate due date and time. This patch corrects this by adding (and using) a new "as_due_date" option to the KohaDates plugin made possible by Bug 11148. Thanks to Galen for providing the changes to KohaDates.pm. To test, enable an hourly loan period for an itemtype in your collection. View the display of date due on the following pages: - Patron details (opac-user.pl) - Log into the OPAC as a user who has something checked out which circulates by the hour. - Bibliographic details (opac-detail.pl) - View the details for an item which is circulates by the hour and is checked out. - Course reserves details (opac-course-details.pl) - View the contents of a course reserve, one of which should be an item which circulates by the hour and is checked out. Due dates for hourly items should show both date and time and be formatted correctly. Due dates for non-hourly loans should show only the date. Test in both prog and Bootstrap themes. Signed-off-by: Aleisha <aleishaamohia@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9723 --- Comment #7 from Jonathan Druart <jonathan.druart@biblibre.com> --- I added the signoff manually. It seems something went wrong on signing off from the sandbox. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9723 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9723 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #27959|0 |1 is obsolete| | --- Comment #8 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 28114 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28114&action=edit Bug 9723 - Hourly loans don't show time due in OPAC Due dates in the OPAC don't display the time items are due, and thus items which are on hourly loans don't display an accurate due date and time. This patch corrects this by adding (and using) a new "as_due_date" option to the KohaDates plugin made possible by Bug 11148. Thanks to Galen for providing the changes to KohaDates.pm. To test, enable an hourly loan period for an itemtype in your collection. View the display of date due on the following pages: - Patron details (opac-user.pl) - Log into the OPAC as a user who has something checked out which circulates by the hour. - Bibliographic details (opac-detail.pl) - View the details for an item which is circulates by the hour and is checked out. - Course reserves details (opac-course-details.pl) - View the contents of a course reserve, one of which should be an item which circulates by the hour and is checked out. Due dates for hourly items should show both date and time and be formatted correctly. Due dates for non-hourly loans should show only the date. Test in both prog and Bootstrap themes. Signed-off-by: Aleisha <aleishaamohia@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9723 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #9 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Owen! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9723 Marjorie Barry-Vila <marjorie.barry-vila@ccsr.qc.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marjorie.barry-vila@ccsr.qc | |.ca -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org