[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Paul Derscheid changed: What|Removed |Added Keywords|rel_25_05_candidate | -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Fridolin Somers changed: What|Removed |Added Status|Pushed to stable|Pushed to oldstable CC||[email protected] ||m Version(s)|25.11.00,25.05.03 |25.11.00,25.05.03,24.11.09 released in|| --- Comment #29 from Fridolin Somers --- Pushed to 24.11.x for 24.11.09 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Bug 40296 depends on bug 37601, which changed state. Bug 37601 Summary: Add status field to bookings table https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37601 What|Removed |Added Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Martin Renvoize (ashimema) changed: What|Removed |Added Blocks|36789 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36789 [Bug 36789] Transform a booking into checkout -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 --- Comment #28 from Paul Derscheid --- Nice work everyone! Pushed to 25.05.x -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Paul Derscheid changed: What|Removed |Added Version(s)|25.11.00|25.11.00,25.05.03 released in|| Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Lucas Gass (lukeg) changed: What|Removed |Added Keywords||rel_24_11_candidate, ||rel_25_05_candidate -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Lucas Gass (lukeg) changed: What|Removed |Added Keywords|additional_work_needed | -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Paul Derscheid changed: What|Removed |Added Blocks||40665 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40665 [Bug 40665] Add booking_id field to issues to link checkouts to bookings that were fulfilled by them -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Kristi Krueger changed: What|Removed |Added CC||[email protected] ||g --- Comment #27 from Kristi Krueger --- Any chance for a backport on this one? -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 --- Comment #26 from Lucas Gass (lukeg) --- follow-up pushed to main -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Paul Derscheid changed: What|Removed |Added Blocks||40656 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40656 [Bug 40656] bookings/list.tt needs to be refactored -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 --- Comment #25 from Lucas Gass (lukeg) --- Created attachment 185454 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185454&action=edit Bug 40296: Fix failing Returns.t test -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 --- Comment #24 from Lucas Gass (lukeg) --- t/db_dependent/Circulation/Returns.t is now failing: # Failed test 'Item without itemtype set raises warning on AddIssue' # at /kohadevbox/koha/t/db_dependent/Circulation/Returns.t line 147. # found warning: item-level_itypes set but no itemtype set for item (1100) at /kohadevbox/koha/Koha/Schema/Result/Item.pm line 1100. # found warning: item-level_itypes set but no itemtype set for item (1100) at /kohadevbox/koha/Koha/Schema/Result/Item.pm line 1100. # found warning: item-level_itypes set but no itemtype set for item (1100) at /kohadevbox/koha/Koha/Schema/Result/Item.pm line 1100. # found warning: item-level_itypes set but no itemtype set for item (1100) at /kohadevbox/koha/Koha/Schema/Result/Item.pm line 1100. # expected to find warning: (?^u:^item-level_itypes set but no itemtype set for item) # expected to find warning: (?^u:^item-level_itypes set but no itemtype set for item) # expected to find warning: (?^u:^item-level_itypes set but no itemtype set for item) ok 3 - biblio-level itype recorded on statistics for return as a fallback for null item-level itype # Looks like you failed 1 test of 3. not ok 1 - AddReturn logging on statistics table (item-level_itypes=1) -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Lucas Gass (lukeg) changed: What|Removed |Added Keywords||additional_work_needed -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 --- Comment #23 from Lucas Gass (lukeg) --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Lucas Gass (lukeg) changed: What|Removed |Added Status|Passed QA |Pushed to main Version(s)||25.11.00 released in|| -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Lucas Gass (lukeg) changed: What|Removed |Added QA Contact|[email protected] |[email protected] |y.org | -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Paul Derscheid changed: What|Removed |Added CC||[email protected] --- Comment #22 from Paul Derscheid --- Rebased onto current upstream/main and passed QA. Sorry for the bloat, forgot to sign off on the first attachment. I followed the test plan and got the expected results, added a commit to increment the test count for Test::NoWarnings (caused test failure on qa). Awesome change, thanks Martin. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Paul Derscheid changed: What|Removed |Added Attachment #185386|0 |1 is obsolete|| --- Comment #21 from Paul Derscheid --- Created attachment 185390 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185390&action=edit Bug 40296: (QA follow-up) Increment test count to include Test::NoWarnings Signed-off-by: Paul Derscheid -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Paul Derscheid changed: What|Removed |Added Attachment #185385|0 |1 is obsolete|| --- Comment #20 from Paul Derscheid --- Created attachment 185389 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185389&action=edit Bug 40296: Add unit tests for booking status handling This patch adds test coverage for the new booking status management in AddIssue: Test scenarios covered: - Patron checking out their own booked item (marks as completed) - Different patron checking out booked item during actual booking period (cancels booking) - Checkout conflicts only during lead period (preserves booking, respects librarian decision) - Checkout period encompassing entire booking period (cancels booking) - No booking present (normal operation) Tests ensure proper booking lifecycle management and validate that librarian override scenarios work as intended. To test: 1. Apply all patches 2. Run: prove t/db_dependent/Circulation.t 3. Verify all booking status handling scenarios pass The test plans now provide: - Step-by-step instructions for manual testing - Multiple scenarios covering different use cases - Clear expectations for what should happen in each case - Practical workflow that staff would actually follow - Edge cases like lead period conflicts and overrides Signed-off-by: Paul Derscheid -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Paul Derscheid changed: What|Removed |Added Attachment #185384|0 |1 is obsolete|| --- Comment #19 from Paul Derscheid --- Created attachment 185388 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185388&action=edit Bug 40296: (follow-up) Fix booking patron ownership and cancellation logic This follow-up addresses critical issues in the initial implementation: 1. **Patron Ownership Check**: Only mark bookings as 'completed' when the patron checking out the item is the same patron who made the booking 2. **Smart Cancellation**: When another patron checks out an item that conflicts with an existing booking: - Cancel the booking only if checkout overlaps with actual booking period - Respect lead/trail periods - don't cancel if conflict is only during preparation periods (allows librarian override scenarios) 3. **Date Logic**: Proper overlap detection using start_date and end_date rather than periods extended by lead time This prevents incorrect booking completion and handles librarian override scenarios appropriately. Test plan: 1. Apply previous patch and this follow-up 2. Enable bookings and create a bookable item Test A - Patron's own booking completion: 3. Create booking for Patron A: start = today, end = +7 days 4. Check out item to Patron A (due date = +5 days) 5. Verify booking status = 'completed' Test B - Lead period override scenario: 11. Return item, set bookings_lead_period circulation rule = 3 days 12. Create booking for Patron A: start = +5 days, end = +8 days 13. Check out item to Patron B (due date = +4 days) - conflicts with lead period 14. Override the booking conflict warning 15. Verify Patron A's booking status remains 'new' (not cancelled) 16. This respects librarian's decision that item will return in time Test C - No booking scenario: 17. Return item, ensure no active bookings exist 18. Check out item to any patron 19. Verify checkout works normally without errors Signed-off-by: Paul Derscheid -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Paul Derscheid changed: What|Removed |Added Attachment #185383|0 |1 is obsolete|| --- Comment #18 from Paul Derscheid --- Created attachment 185387 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185387&action=edit Bug 40296: Mark booking as completed when issuing to booking patron This patch adds logic to automatically mark a patron's booking as 'completed' when they check out the item they have booked. When AddIssue is called, the system now: - Checks if there's a conflicting booking for the checkout period - Marks the booking status as 'completed' if found This ensures booking status accurately reflects when items are actually checked out to fulfill bookings. Test plan: 1. Enable bookings system preference 2. Create a bookable item (set bookable = 1 in items table or via item editor) 3. Create a booking for a patron for that item with start date = today, end date = 7 days from now 4. Go to circulation and check out the item to the same patron who made the booking 5. Check the booking status in the database or via the bookings interface 6. Verify the booking status has changed from 'new' to 'completed' 7. Confirm the checkout was successful and shows normally in patron's checkouts list Signed-off-by: Martin Renvoize Signed-off-by: Paul Derscheid -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 --- Comment #17 from Paul Derscheid --- Created attachment 185386 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185386&action=edit Bug 40296: (QA follow-up) Increment test count to include Test::NoWarnings -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Paul Derscheid changed: What|Removed |Added Attachment #183822|0 |1 is obsolete|| --- Comment #16 from Paul Derscheid --- Created attachment 185385 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185385&action=edit Bug 40296: Add unit tests for booking status handling This patch adds test coverage for the new booking status management in AddIssue: Test scenarios covered: - Patron checking out their own booked item (marks as completed) - Different patron checking out booked item during actual booking period (cancels booking) - Checkout conflicts only during lead period (preserves booking, respects librarian decision) - Checkout period encompassing entire booking period (cancels booking) - No booking present (normal operation) Tests ensure proper booking lifecycle management and validate that librarian override scenarios work as intended. To test: 1. Apply all patches 2. Run: prove t/db_dependent/Circulation.t 3. Verify all booking status handling scenarios pass The test plans now provide: - Step-by-step instructions for manual testing - Multiple scenarios covering different use cases - Clear expectations for what should happen in each case - Practical workflow that staff would actually follow - Edge cases like lead period conflicts and overrides -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Paul Derscheid changed: What|Removed |Added Attachment #183821|0 |1 is obsolete|| --- Comment #15 from Paul Derscheid --- Created attachment 185384 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185384&action=edit Bug 40296: (follow-up) Fix booking patron ownership and cancellation logic This follow-up addresses critical issues in the initial implementation: 1. **Patron Ownership Check**: Only mark bookings as 'completed' when the patron checking out the item is the same patron who made the booking 2. **Smart Cancellation**: When another patron checks out an item that conflicts with an existing booking: - Cancel the booking only if checkout overlaps with actual booking period - Respect lead/trail periods - don't cancel if conflict is only during preparation periods (allows librarian override scenarios) 3. **Date Logic**: Proper overlap detection using start_date and end_date rather than periods extended by lead time This prevents incorrect booking completion and handles librarian override scenarios appropriately. Test plan: 1. Apply previous patch and this follow-up 2. Enable bookings and create a bookable item Test A - Patron's own booking completion: 3. Create booking for Patron A: start = today, end = +7 days 4. Check out item to Patron A (due date = +5 days) 5. Verify booking status = 'completed' Test B - Lead period override scenario: 11. Return item, set bookings_lead_period circulation rule = 3 days 12. Create booking for Patron A: start = +5 days, end = +8 days 13. Check out item to Patron B (due date = +4 days) - conflicts with lead period 14. Override the booking conflict warning 15. Verify Patron A's booking status remains 'new' (not cancelled) 16. This respects librarian's decision that item will return in time Test C - No booking scenario: 17. Return item, ensure no active bookings exist 18. Check out item to any patron 19. Verify checkout works normally without errors -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Paul Derscheid changed: What|Removed |Added Attachment #183820|0 |1 is obsolete|| --- Comment #14 from Paul Derscheid --- Created attachment 185383 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185383&action=edit Bug 40296: Mark booking as completed when issuing to booking patron This patch adds logic to automatically mark a patron's booking as 'completed' when they check out the item they have booked. When AddIssue is called, the system now: - Checks if there's a conflicting booking for the checkout period - Marks the booking status as 'completed' if found This ensures booking status accurately reflects when items are actually checked out to fulfill bookings. Test plan: 1. Enable bookings system preference 2. Create a bookable item (set bookable = 1 in items table or via item editor) 3. Create a booking for a patron for that item with start date = today, end date = 7 days from now 4. Go to circulation and check out the item to the same patron who made the booking 5. Check the booking status in the database or via the bookings interface 6. Verify the booking status has changed from 'new' to 'completed' 7. Confirm the checkout was successful and shows normally in patron's checkouts list Signed-off-by: Martin Renvoize -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Paul Derscheid changed: What|Removed |Added Status|Failed QA |Passed QA -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Eric Garcia changed: What|Removed |Added Status|Needs Signoff |Failed QA --- Comment #13 from Eric Garcia --- Test A Fails Booking status is still "new" after checking out to the same patron -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Martin Renvoize (ashimema) changed: What|Removed |Added Blocks||36789 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36789 [Bug 36789] Transform a booking into checkout -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Martin Renvoize (ashimema) changed: What|Removed |Added CC||[email protected] ||m --- Comment #12 from Martin Renvoize (ashimema) --- *** Bug 36789 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Martin Renvoize (ashimema) changed: What|Removed |Added Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Martin Renvoize (ashimema) changed: What|Removed |Added Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Martin Renvoize (ashimema) changed: What|Removed |Added Attachment #183745|0 |1 is obsolete|| --- Comment #11 from Martin Renvoize (ashimema) --- Created attachment 183822 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183822&action=edit Bug 40296: Add unit tests for booking status handling This patch adds test coverage for the new booking status management in AddIssue: Test scenarios covered: - Patron checking out their own booked item (marks as completed) - Different patron checking out booked item during actual booking period (cancels booking) - Checkout conflicts only during lead period (preserves booking, respects librarian decision) - Checkout period encompassing entire booking period (cancels booking) - No booking present (normal operation) Tests ensure proper booking lifecycle management and validate that librarian override scenarios work as intended. To test: 1. Apply all patches 2. Run: prove t/db_dependent/Circulation.t 3. Verify all booking status handling scenarios pass The test plans now provide: - Step-by-step instructions for manual testing - Multiple scenarios covering different use cases - Clear expectations for what should happen in each case - Practical workflow that staff would actually follow - Edge cases like lead period conflicts and overrides -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Martin Renvoize (ashimema) changed: What|Removed |Added Attachment #183744|0 |1 is obsolete|| --- Comment #10 from Martin Renvoize (ashimema) --- Created attachment 183821 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183821&action=edit Bug 40296: (follow-up) Fix booking patron ownership and cancellation logic This follow-up addresses critical issues in the initial implementation: 1. **Patron Ownership Check**: Only mark bookings as 'completed' when the patron checking out the item is the same patron who made the booking 2. **Smart Cancellation**: When another patron checks out an item that conflicts with an existing booking: - Cancel the booking only if checkout overlaps with actual booking period - Respect lead/trail periods - don't cancel if conflict is only during preparation periods (allows librarian override scenarios) 3. **Date Logic**: Proper overlap detection using start_date and end_date rather than periods extended by lead time This prevents incorrect booking completion and handles librarian override scenarios appropriately. Test plan: 1. Apply previous patch and this follow-up 2. Enable bookings and create a bookable item Test A - Patron's own booking completion: 3. Create booking for Patron A: start = today, end = +7 days 4. Check out item to Patron A (due date = +5 days) 5. Verify booking status = 'completed' Test B - Lead period override scenario: 11. Return item, set bookings_lead_period circulation rule = 3 days 12. Create booking for Patron A: start = +5 days, end = +8 days 13. Check out item to Patron B (due date = +4 days) - conflicts with lead period 14. Override the booking conflict warning 15. Verify Patron A's booking status remains 'new' (not cancelled) 16. This respects librarian's decision that item will return in time Test C - No booking scenario: 17. Return item, ensure no active bookings exist 18. Check out item to any patron 19. Verify checkout works normally without errors -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Martin Renvoize (ashimema) changed: What|Removed |Added Attachment #183743|0 |1 is obsolete|| --- Comment #9 from Martin Renvoize (ashimema) --- Created attachment 183820 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183820&action=edit Bug 40296: Mark booking as completed when issuing to booking patron This patch adds logic to automatically mark a patron's booking as 'completed' when they check out the item they have booked. When AddIssue is called, the system now: - Checks if there's a conflicting booking for the checkout period - Marks the booking status as 'completed' if found This ensures booking status accurately reflects when items are actually checked out to fulfill bookings. Test plan: 1. Enable bookings system preference 2. Create a bookable item (set bookable = 1 in items table or via item editor) 3. Create a booking for a patron for that item with start date = today, end date = 7 days from now 4. Go to circulation and check out the item to the same patron who made the booking 5. Check the booking status in the database or via the bookings interface 6. Verify the booking status has changed from 'new' to 'completed' 7. Confirm the checkout was successful and shows normally in patron's checkouts list Signed-off-by: Martin Renvoize -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Hannah Dunne-Howrie changed: What|Removed |Added CC||[email protected] ||ov.uk --- Comment #8 from Hannah Dunne-Howrie --- Yes, we'd want to see a complete workflow for Bookings that mirrors the behaviour of the holds workflow. This is what library staff and library users will expect, i.e. check out of the item completes the booking so that we can then report and monitor bookings in the way we do holds. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 --- Comment #7 from Martin Renvoize (ashimema) --- Ooops.. that test plan includes functionality that doesn't yet exist.. the override option! I'll update the test plan.. the code is ready for the override option later, but for now we don't need to test it as it's not actually exposed in the UI yet. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Eric Garcia changed: What|Removed |Added Status|Needs Signoff |Failed QA CC||[email protected] --- Comment #6 from Eric Garcia --- Test B fails. Booking status remains as "new" instead of being updated to "cancelled" when checked out to Patron B. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Lucas Gass (lukeg) changed: What|Removed |Added QA Contact|[email protected] |[email protected] |o.uk|y.org -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Lucas Gass (lukeg) changed: What|Removed |Added Assignee|[email protected] |[email protected] ||o.uk -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Martin Renvoize (ashimema) changed: What|Removed |Added Attachment #183717|0 |1 is obsolete|| -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 --- Comment #5 from Martin Renvoize (ashimema) --- Created attachment 183745 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183745&action=edit Bug 40296: Add unit tests for booking status handling This patch adds test coverage for the new booking status management in AddIssue: Test scenarios covered: - Patron checking out their own booked item (marks as completed) - Different patron checking out booked item during actual booking period (cancels booking) - Checkout conflicts only during lead period (preserves booking, respects librarian decision) - Checkout period encompassing entire booking period (cancels booking) - No booking present (normal operation) Tests ensure proper booking lifecycle management and validate that librarian override scenarios work as intended. To test: 1. Apply all patches 2. Run: prove t/db_dependent/Circulation.t 3. Verify all booking status handling scenarios pass The test plans now provide: - Step-by-step instructions for manual testing - Multiple scenarios covering different use cases - Clear expectations for what should happen in each case - Practical workflow that staff would actually follow - Edge cases like lead period conflicts and overrides -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 --- Comment #4 from Martin Renvoize (ashimema) --- Created attachment 183744 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183744&action=edit Bug 40296: (follow-up) Fix booking patron ownership and cancellation logic This follow-up addresses critical issues in the initial implementation: 1. **Patron Ownership Check**: Only mark bookings as 'completed' when the patron checking out the item is the same patron who made the booking 2. **Smart Cancellation**: When another patron checks out an item that conflicts with an existing booking: - Cancel the booking only if checkout overlaps with actual booking period - Respect lead/trail periods - don't cancel if conflict is only during preparation periods (allows librarian override scenarios) 3. **Date Logic**: Proper overlap detection using start_date and end_date rather than periods extended by lead time This prevents incorrect booking completion and handles librarian override scenarios appropriately. Test plan: 1. Apply previous patch and this follow-up 2. Enable bookings and create a bookable item Test A - Patron's own booking completion: 3. Create booking for Patron A: start = today, end = +7 days 4. Check out item to Patron A (due date = +5 days) 5. Verify booking status = 'completed' Test B - Another patron's booking cancellation: 6. Return the item, create new booking for Patron A: start = +2 days, end = +6 days 7. Check out item to Patron B (due date = +4 days) - may need override 8. Verify Patron A's booking status = 'cancelled' Test C - Lead period override scenario: 9. Return item, set bookings_lead_period circulation rule = 3 days 10. Create booking for Patron A: start = +5 days, end = +8 days 11. Check out item to Patron B (due date = +4 days) - conflicts with lead period 12. Override the booking conflict warning 13. Verify Patron A's booking status remains 'new' (not cancelled) 14. This respects librarian's decision that item will return in time Test D - No booking scenario: 15. Return item, ensure no active bookings exist 16. Check out item to any patron 17. Verify checkout works normally without errors -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 --- Comment #3 from Martin Renvoize (ashimema) --- Created attachment 183743 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183743&action=edit Bug 40296: Mark booking as completed when issuing to booking patron This patch adds logic to automatically mark a patron's booking as 'completed' when they check out the item they have booked. When AddIssue is called, the system now: - Checks if there's a conflicting booking for the checkout period - Marks the booking status as 'completed' if found This ensures booking status accurately reflects when items are actually checked out to fulfill bookings. Test plan: 1. Enable bookings system preference 2. Create a bookable item (set bookable = 1 in items table or via item editor) 3. Create a booking for a patron for that item with start date = today, end date = 7 days from now 4. Go to circulation and check out the item to the same patron who made the booking 5. Check the booking status in the database or via the bookings interface 6. Verify the booking status has changed from 'new' to 'completed' 7. Confirm the checkout was successful and shows normally in patron's checkouts list Signed-off-by: Martin Renvoize -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Martin Renvoize (ashimema) changed: What|Removed |Added Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Martin Renvoize (ashimema) changed: What|Removed |Added See Also||https://bugs.koha-community ||.org/bugzilla3/show_bug.cgi ||?id=36789 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Martin Renvoize (ashimema) changed: What|Removed |Added Severity|normal |major -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Martin Renvoize (ashimema) changed: What|Removed |Added Depends on||37601 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37601 [Bug 37601] Add status field to bookings table -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Martin Renvoize (ashimema) changed: What|Removed |Added Circulation||Bookings function|| -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Martin Renvoize (ashimema) changed: What|Removed |Added QA Contact|[email protected] |[email protected] |y.org |o.uk Assignee|[email protected] |[email protected] |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 --- Comment #2 from Lucas Gass (lukeg) --- Created attachment 183717 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183717&action=edit Bug 40296: Mark booking as completed when issuing -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Lucas Gass (lukeg) changed: What|Removed |Added CC||[email protected] ||o.uk -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 40296] Bookings that are checked out do not have status updated to completed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40296 Lucas Gass (lukeg) changed: What|Removed |Added Summary|Bookings that are checked |Bookings that are checked |out can be double counted |out do not have status ||updated to completed -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. ___ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
