[Koha-bugs] [Bug 6796] Overnight checkouts taking into account opening and closing hours

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jul 10 16:26:49 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6796

Sam Lau <samalau at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #153254|0                           |1
        is obsolete|                            |

--- Comment #51 from Sam Lau <samalau at gmail.com> ---
Created attachment 153273
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=153273&action=edit
Bug 6796: Consider library hours when calculating due date + tests

This feature adds the ability to set opening and closing hours for your
library and for these hours to be considered when calculating due dates
for hourly loans. If the due date for an hourly loan falls after the
library closes, the library can choose for the due date to be shortened
to meet the close time, or extended to meet the open time the next day.
This feature adds a new table 'branch_hours' for storing the open and
close times per day for each library, and a new system preference
'ConsiderLibraryHoursWhenIssuing' to choose which behaviour should be
followed when calculating due dates.

To test:
1. Apply patches and update database. Upgrade schema if not applying
patch with schema changes. Restart services.
2. Go to Administration -> Libraries. Edit a library and scroll to the
bottom to find the 'opening hours' section. Test adding and removing
open and close times on various days. Confirm saving works as expected.
3. Add a new library and test adding open and close times works as
expected.
4. Edit your default library and save open and close times for each day.
5. Go to Administration -> Circulation and fine rules. Edit a rule, set
the unit to 'hours' and set the loan period to a number that would cause
a checkout to be due after the close time you just set, i.e. if you set
your close time to be 5pm and your system time is currently 1pm, set the
loan period to be 5 (5 hours) so the calculated due date would be 6pm.
6. Go to Administration -> system preferences. Search for
ConsiderLibraryHoursWhenIssuing. It should be under 'Checkout policy' in
the Circulation system preferences. Confirm the pre-selected option is
'ignore'. Keep this tab open.
6. In a new tab, get the barcode for an item that has an itemtype
matching the circulation rule you just set.
7. Go to the checkouts for a patron that has a categorycode matching the
circulation rule you just set.
8. Check out your item. Confirm that the checkout is due at the end of
the loan period, not taking closing hours into consideration. Return the
item.
9. Back in your other tab, set ConsiderLibraryHoursWhenIssuing to
'close', so the due date should be shortened to meet the close time.
10. Check out your item. Confirm the checkout is due when the library
closes. Return the item.
11. Back in your other tab, set ConsiderLibraryHoursWhenIssuing to
'open', so the due date should be extended to meet the opening time.
12. Check out your item. Confirm the checkout is due the next day when
the library opens.
13. Confirm tests pass t/db_dependent/Circulation/CalcDateDue.t

Sponsored-by: Catalyst IT
Signed-off-by: Sam Lau <samalau at gmail.com>

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the QA Contact for the bug.


More information about the Koha-bugs mailing list