https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41514

--- Comment #10 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 204955
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=204955&action=edit
Bug 41514: (QA follow-up) Use the itemtype_id filter for auto-assignment's
lead/trail rule lookup

_assign_item_for_booking() always looked up the bookings_lead_period /
bookings_trail_period rule using the biblio's default itemtype
(biblioitem.itemtype), even when the caller requested an "any item of
itemtype X" booking via set_itemtype_filter() (wired up from the REST
API's itemtype_id parameter).

On a biblio with mixed item-level itemtypes that have different lead/
trail rules, this meant an item could be auto-assigned to a booking
that actually violates its own itemtype's configured buffer period,
because the exclusion query used the wrong itemtype's rule while the
item search correctly used the filter for candidate selection.

Use the itemtype filter for the rule lookup when it is set, falling
back to the biblio's default itemtype otherwise.

Test plan:
1. prove t/db_dependent/Koha/Booking.t

Signed-off-by: Martin Renvoize <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to