Bug 37201

Summary: Add a syspref to allow or not a checkout if a expired booking exists for the same patron
Product: Koha Reporter: Thibaud Guillot <thibaud.guillot>
Component: CirculationAssignee: Thibaud Guillot <thibaud.guillot>
Status: Needs Signoff --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: david, gmcharlt, kyle.m.hall
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: Sponsored Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 36789    
Bug Blocks:    
Attachments: Bug 37201: Allow or not a checkout if a expired booking exists
Bug 37201: Allow or not a checkout if a expired booking exists

Description Thibaud Guillot 2024-06-26 15:04:03 UTC
Hello :) 

I've worked on a way to prevent checkout to patron if this same patron has a booking expired for the same item.. 

I think it's a setting that might not suit everyone, so I've introduced a new system preference.

I'll put my patch in place and await your comments. Thanks ^^
Comment 1 Thibaud Guillot 2024-06-26 15:13:26 UTC
Created attachment 168159 [details] [review]
Bug 37201: Allow or not a checkout if a expired booking exists

Test plan:

1) Apply this patch and run updatedatabase
2) Set a booking on a specific item
3) In database you can update the value to set a past date for booking
   end for example.
4) Go system preferences and search 'AllowExpiredBookingTransformation'
5) When you "Don\'t allow" normally you will find a pop up to confirm
   the checkout when you choose to 'Transform to checkout' from bookings
   list view.

Sponsored by: Association de Gestion des Œuvres Sociales d'Inria (AGOS)
Comment 2 Thibaud Guillot 2024-06-28 08:25:00 UTC
Created attachment 168227 [details] [review]
Bug 37201: Allow or not a checkout if a expired booking exists

Test plan:

1) Apply this patch and run updatedatabase
2) Set a booking on a specific item
3) In database you can update the value to set a past date for booking
   end for example.
4) Go system preferences and search 'AllowExpiredBookingTransformation'
5) When you "Don\'t allow" normally you will find a pop up to confirm
   the checkout when you choose to 'Transform to checkout' from bookings
   list view.

Sponsored by: Association de Gestion des Œuvres Sociales d'Inria (AGOS)
Comment 3 David Nind 2024-07-04 20:51:53 UTC
Note: A patch for a dependency (bug 36789) no longer applies, so can't be tested until that is resolved.