When placing a booking and choosing 'any item' - Koha will use the first item available in a booking period - so multiple placed bookings will stack on this item. While overlapping periods are blocked, it does appear odd to the user, and maximizes the chances of an item not being returned in time. It would be nice for libraries to force choosing an item, and/or to select the first item with no bookings, or the least bookings, or just to add some variation to the item selected.
It seems that setting the item_id value of the booking (in the bookings) table causes the particular booking to be record level. So far it looks like everything still behaves correctly in terms of avoiding conflicting or overlapping bookings. So possibly all that's needed might be to simply not set item_id when 'any item' is selected.
(In reply to jpl from comment #1) > It seems that setting the item_id value of the booking (in the bookings) > table causes the particular booking to be record level. So far it looks like > everything still behaves correctly in terms of avoiding conflicting or > overlapping bookings. > > So possibly all that's needed might be to simply not set item_id when 'any > item' is selected. Correction: setting item_id to NULL causes a record level booking.
The intention was to allow record-level bookings, but the picker logic can't currently handle that so I added the auto-assignment at booking time as a workaround. We fix the randomisation of item selection in bug 38175 also.. where I add unit tests for the assignment function. *** This bug has been marked as a duplicate of bug 38175 ***