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

Thibaud Guillot (thibaud_g) <[email protected]> changed:

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

--- Comment #9 from Thibaud Guillot (thibaud_g) <[email protected]> 
---
Created attachment 205142
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=205142&action=edit
Bug 37201: Add AllowExpiredBookingTransformation syspref

When staff transform a booking into a checkout from the bookings list,
Koha did not check whether the booking period had already ended.

This patch adds the AllowExpiredBookingTransformation system preference
(Administration > Circulation > Booking module, default "Allow"):

- "Allow": an expired booking can be transformed into a checkout as
  before.
- "Don't allow": CanBookBeIssued raises the BOOKED_EXPIRED confirmation.
  Staff without the "force_checkout" permission are blocked; staff with
  it can still override from the checkout screen.

Test plan:
1) Apply patch, run updatedatabase and restart_all
2) Enable the booking module, make an item bookable and place a booking
   for a patron on it
3) Push the booking into the past:
   UPDATE bookings SET start_date = NOW() - INTERVAL XX DAY,
                       end_date   = NOW() - INTERVAL XX DAY;
4) Confirm the new pref shows under Administration > Circulation >
   Booking module, default "Allow"
5) With "Allow": from the bookings list click "Transform to checkout"
   -> checkout succeeds with a normal due date, no "date in the past"
   confirmation
6) Set the pref to "Don't allow":
   a) as staff WITHOUT the force_checkout permission: "Transform to
      checkout" is refused (only "No, don't check out" is offered)
   b) as staff WITH the force_checkout permission: the confirmation
      shows "This booking expired on DD/MM/YYYY." and "Yes, check out
      (Y)" completes the checkout
7) Set a booking with an end date in the future and check "Transform to
   checkout" still caps the due date at the booked end date

Sponsored by: Association de Gestion des Ĺ’uvres Sociales d'Inria (AGOS)

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to