I missed renewals booking checks in the original submission.. it needs adding to prevent renewals that would overlap with a future booking.
Created attachment 162407 [details] [review] Bug 35944: Unit tests
Created attachment 162408 [details] [review] Bug 35944: Add booking handling to CanBookBeRenewed This patch adds a bookings check to CanBookBeRenewed
Created attachment 162417 [details] [review] Bug 35944: Unit tests Signed-off-by: David Nind <david@davidnind.com>
Created attachment 162418 [details] [review] Bug 35944: Add booking handling to CanBookBeRenewed This patch adds a bookings check to CanBookBeRenewed Signed-off-by: David Nind <david@davidnind.com>
Note: With the patch applied, and a booking made so that the item can't be renewed - text displayed under '0 booked' says "(5 of 5 renewals remaining)". Testing notes (using KTD): 1. Make an item bookable: - Find a record with items - Go to the details page - Go to the items tab - For the item priority, change bookable to 'Yes' 2. Check out the item to a patron 3. Make a booking for another patron for a period that would be covered by the next renewal: - From the record page, select 'Place booking' - Select a patron - Select a period (starting date and ending date) - Submit 4. Renew the item - it is renewed, even though it is also booked during the period covered by the renewal 5. Cancel the booking and check in the item. 6. Apply the patch (including all the dependencies), updatedatabase, restart_all 7. Repeat steps 2 and 3 8. Should be unable to renew the item - should show 'booked' instead of the normal check box to select the item for renewal. 9. Tests should pass before and after the patch is applied: prove t/db_dependent/Circulation.t
Created attachment 162423 [details] [review] Bug 35944: Add message to SIP renewal attempt This patch adds a replacement for 'booked' to the SIP renewal handling so we can display 'Item is booked for another borrower'.
Created attachment 162424 [details] [review] Bug 35944: Add link to 'booked' biblio in checkouts table This patch updates the checkouts table so handle 'booked' items including linking to the biblio booking details page.
Just a couple of minor follow-ups to improve translatability in the checkouts table and properly handle things in SIP. Thanks for testing David :)
*** Bug 36040 has been marked as a duplicate of this bug. ***
There is a whole dependency tree still in PQA for this one. Skipping for now.
Created attachment 163201 [details] [review] Bug 35944: Unit tests Signed-off-by: David Nind <david@davidnind.com>
Created attachment 163202 [details] [review] Bug 35944: Add booking handling to CanBookBeRenewed This patch adds a bookings check to CanBookBeRenewed Signed-off-by: David Nind <david@davidnind.com>
Created attachment 163203 [details] [review] Bug 35944: Add message to SIP renewal attempt This patch adds a replacement for 'booked' to the SIP renewal handling so we can display 'Item is booked for another borrower'.
Created attachment 163204 [details] [review] Bug 35944: Add link to 'booked' biblio in checkouts table This patch updates the checkouts table so handle 'booked' items including linking to the biblio booking details page.
Created attachment 163205 [details] [review] Bug 35944: (QA follow-up) Check if there are bookings before other calculations
Created attachment 163206 [details] [review] Bug 35944: (QA follow-up) Tidy
Very minor rebase, small follow-up to address performance concerns - could you just give a nod Martin?
Created attachment 163208 [details] [review] Bug 35944: Unit tests Signed-off-by: David Nind <david@davidnind.com>
Created attachment 163209 [details] [review] Bug 35944: Add booking handling to CanBookBeRenewed This patch adds a bookings check to CanBookBeRenewed Signed-off-by: David Nind <david@davidnind.com>
Created attachment 163210 [details] [review] Bug 35944: Add message to SIP renewal attempt This patch adds a replacement for 'booked' to the SIP renewal handling so we can display 'Item is booked for another borrower'.
Created attachment 163211 [details] [review] Bug 35944: Add link to 'booked' biblio in checkouts table This patch updates the checkouts table so handle 'booked' items including linking to the biblio booking details page.
Created attachment 163212 [details] [review] Bug 35944: (QA follow-up) Check if there are bookings before other calculations
Created attachment 163213 [details] [review] Bug 35944: (QA follow-up) Tidy
Very happy with the follow-up, it gets my vote :)
Pushed for 24.05! Well done everyone, thank you!
Waiting for Bug 35248 backport
Pushed to 23.11.x for 23.11.05
Not needed in 23.05.x