https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40644
Andrew Fuerste-Henry <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185360|0 |1 is obsolete| | --- Comment #5 from Andrew Fuerste-Henry <[email protected]> --- Created attachment 185417 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185417&action=edit Bug 40644: Only count checkouts that have not yet been counted as bookings Test plan: 1) Have a record with 8 items. 2) Place a booking on 6 of the items (6 bookings total) for a full month (e.g. August) 3) Check-out all 6 of those bookings 4) Attempt to place a new booking for one of the 2 free items for end of month, e.g. (Aug 26 -> Aug 28). 5) It will fail with error "Booking conflicts". This is because the code is adding 6 checkouts with 6 bookings = 12 which is higher than 8 bookable items. 6) With this patch, check-outs that refer to an existing booking are excluded, so the check becomes if 8 - 6 > 0 (which passes the check) rather than 8 - 12 > 0 (which fails the check) Run existing tests: prove t/db_dependent/Koha/Item.t prove t/db_dependent/Koha/Biblio.t prove t/db_dependent/Koha/Booking.t Signed-off-by: Andrew Fuerste Henry <[email protected]> -- 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/
