Return calculated value for SIP recall_ok test
authorBill Erickson <berick@esilibrary.com>
Wed, 26 Dec 2012 15:29:30 +0000 (10:29 -0500)
committerMike Rylander <mrylander@gmail.com>
Wed, 13 Mar 2013 17:32:34 +0000 (13:32 -0400)
Determine the value for the "recall OK" testing for patron information
requests the same we we determine the value for ciruclations and holds.
Previously, the recall-OK test always returned false, presumably since
recalls are not currently supported in Evergreen SIP.

Note that like holds and circs, we determine whether a user has good
standing based on the users penalties and whether the user is active /
non-barred.  Though we could in some cases, we are not checking whether
the user has the required permission to perform specific tasks.

This feature is enabled via a new oils_sip.xml configuration option:

<option name='patron_calculate_recal_ok' value='true' />

This option is disabled by default.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/examples/oils_sip.xml.example
Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm

index 8a1d7ab..d6c5d88 100644 (file)
                         use the SIP date format.
                     <option name='use_sip_date_format' value='true' />
                     -->
+
+                                       <!--
+                                               If enabled, return the calculated value for the recall
+                                               flag instead of always returning not-OK
+                                       <option name='patron_calculate_recal_ok' value='true' />
+                                       -->
+
                                </options>
 
                 <checkin_override>
index 4a77bd0..5ce70e9 100644 (file)
@@ -325,6 +325,8 @@ sub renew_ok {
 
 sub recall_ok {
     my $self = shift;
+    return $self->charge_ok if 
+        OpenILS::SIP->get_option_value('patron_calculate_recal_ok');
     return 0;
 }