https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27058
Marcel de Rooy <m.de.r...@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114211|0 |1 is obsolete| | --- Comment #22 from Marcel de Rooy <m.de.r...@rijksmuseum.nl> --- Created attachment 117781 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117781&action=edit Bug 27058: Make checkout availability use all notforloan reasons The ItemsAnyAvailableAndNotRestricted function is checking whether an item can be checked out and it incorrectly only checks the positive notforloan values when there can be also negative notforloan values. If notforloan value is not 0 then it means the item cannot be checked out. In the case of ordered items the value is negative (-1) and thus before this change the checkout availability was reported incorrectly. To test: 1) Run prove t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t Notice it fails 2) Apply this patch 3) Run prove t/db_dependent/Holds/DisallowHoldIfItemsAvailable.t Notice it passes now. To test via Koha sandbox (Alternatively): 1) Create circ rule with If all unavailable 2) Create new biblio 3) Order a new item to the biblio via acquisitions and set the not for loan value to Ordered / -1 4) Notice you cannot place a hold to the biblio 5) Apply patch 6) Notice you can now place a hold to the biblio Signed-off-by: Kyle M Hall <k...@bywatersolutions.com> Signed-off-by: Marcel de Rooy <m.de.r...@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org 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/