[Bug 10819] Allow for auto filling of holds when items are checked in via SCO
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10819 --- Comment #7 from Emily Lamancusa (emlam) <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 209034 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209034&action=edit Bug 10819: Add capture method to Koha::Hold Add an object method, capture(), to Koha::Hold to use in place of C4::Reserves::ModHoldAffect. Currently, ModHoldAffect determines whether HoldsNeedProcessingSIP applies by checking for a "sip" context interface. However, this won't work for HoldsNeedProcessingSCO because the self-checkout module doesn't have a unique interface value (it uses the "OPAC" context interface). Instead, create an equivalent object method, $hold->capture, to allow a needsProcessing value to be passed as a parameter instead. $hold->capture($item) will assign the provided item to the hold, determine the appropriate found status, and set the hold to that status. For the most part, this method should produce the same results as ModHoldAffect, except for the following changes: - needsProcessing passed as an optional parameter as stated above - it is the caller's responsibility to handle any existing item transfers, if needed, before capturing the hold. (ModHoldAffect resolves the existing transfer, but only when the hold is set to Waiting) - it is NOT the caller's responsibility to determine whether the hold should be put in transit. That is determined internally by comparing the hold pickup branch to the context branch. - if a hold is placed in the transit status, this method requests the item transfer as well. An optional parameter transferAutoSend can be passed to send the transfer as well; otherwise, the item transfer will remain in the "requested" state. To test: prove t/db_dependent/Koha/Hold.t prove t/db_dependent/HoldsQueue.t -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org