]> git.evergreen-ils.org Git - Evergreen.git/commit
Patch from Brandon Uhlman addressing SIP2 unavailable holds display.
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 29 Mar 2011 17:00:08 +0000 (17:00 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 29 Mar 2011 17:00:08 +0000 (17:00 +0000)
commit56a1e7599fa55a09ac50e018e11ea71de9a2fc2b
tree4d15eb120d9dd47a76acd08e1de55a57656346c8
parent01f575c5bb67bb74558603e5e37dcd1afa2c5dfd
Patch from Brandon Uhlman addressing SIP2 unavailable holds display.

The unavail_holds() function in OpenILS::SIP::Patron is a placeholder that returns an empty set, instead of an actual list of a patrons' holds not cur
rently ready for pickup.

When an SC determines whether a patron has holds ready for pickup by comparing the cardinalities of hold_items() and unavail_holds() [*] using the exi
sting unavail_holds() logic, it effectively reports every currently placed hold as ready for pickup, which is generally not true.

The attached patch assumes that unavailable holds are those that meet one of two sets of conditions:
- hold requests that are not cancelled (cancel_time = null), not fulfilled (fulfillment time = null), and not captured (capture_time = null)
- hold requests that are neither cancelled nor fulfilled (as above), are captured (capture_time != null), and for which, additionally, the current_cop
y does not have the status 'On holds shelf' (status = 8). The only items that should meet this condition are those that are in transit to a location w
here they will be added to the holds shelf.

The patch iterates through the items meeting each condition, and adds them to a master list of relevant holds, which it then processes (in the same wa
y that hold_items is processed) and returns.

This patch was developed against and tested on rel_1_6_0 from SVN (~ 1.6.0.2), but should apply cleanly against current rel_1_6_0 and trunk; OpenSRF 1
.2.2, PostgreSQL 8.3.8, Ubuntu Hardy 64-bit.

[*] The two cardinalities are returned by SIP message 64 as fixed-length integers in positions 35-38 and 55-58 respectively, so we don't need to itera
te through the list ourseles.

git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6_1@19898 dcc99617-32d9-48b4-a31d-7c20da2025e4
Open-ILS/src/perlmods/OpenILS/SIP/Patron.pm