Bug 37201 - Add a syspref to allow or not a checkout if a expired booking exists for the same patron
Summary: Add a syspref to allow or not a checkout if a expired booking exists for the ...
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Thibaud Guillot (thibaud_g)
QA Contact: Testopia
URL:
Keywords:
Depends on: 36789
Blocks:
  Show dependency treegraph
 
Reported: 2024-06-26 15:04 UTC by Thibaud Guillot (thibaud_g)
Modified: 2024-08-21 11:51 UTC (History)
4 users (show)

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


Attachments
Bug 37201: Allow or not a checkout if a expired booking exists (7.08 KB, patch)
2024-06-26 15:13 UTC, Thibaud Guillot (thibaud_g)
Details | Diff | Splinter Review
Bug 37201: Allow or not a checkout if a expired booking exists (6.88 KB, patch)
2024-06-28 08:25 UTC, Thibaud Guillot (thibaud_g)
Details | Diff | Splinter Review
Bug 37201: Allow or not a checkout if a expired booking exists (6.72 KB, patch)
2024-08-09 13:38 UTC, Thibaud Guillot (thibaud_g)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Thibaud Guillot (thibaud_g) 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 (thibaud_g) 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 (thibaud_g) 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.
Comment 4 Thibaud Guillot (thibaud_g) 2024-08-09 13:38:47 UTC
Created attachment 170192 [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 5 Paul Derscheid 2024-08-09 14:04:28 UTC
When I try to apply this patch, it doesn't apply the dependencies, probably due to 36789 being set to 'Patch doesn't apply'. Just FYI.