[open-ils-commits] [GIT] Evergreen ILS branch master updated. 7d76898b674441d989d096442861831c9adb4ba3

Evergreen Git git at git.evergreen-ils.org
Fri Sep 6 17:56:30 EDT 2019


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  7d76898b674441d989d096442861831c9adb4ba3 (commit)
      from  6b39b42f25f358eb8d7e23af4b56afb3f029ec24 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7d76898b674441d989d096442861831c9adb4ba3
Author: Jason Stephenson <jason at sigio.com>
Date:   Fri Nov 2 09:03:07 2018 -0400

    Lp 1799272: Option to Limit Hold Items in SIP2 msg 64 to Available
    
    This commit adds an implementation option to the oils_sip.xml that,
    when enabled, will limit the hold items list and hold items counts in
    the patron information response (response 64) to only the holds
    available for pickup by the patron.  When the setting is not enabled,
    the full list of the patron's holds continues to be used.
    
    Signed-off-by: Jason Stephenson <jason at sigio.com>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/Open-ILS/examples/oils_sip.xml.example b/Open-ILS/examples/oils_sip.xml.example
index 2146775f19..06da91bec7 100644
--- a/Open-ILS/examples/oils_sip.xml.example
+++ b/Open-ILS/examples/oils_sip.xml.example
@@ -118,6 +118,13 @@
                     <option name='msg64_hold_datatype' value='barcode' />
                     -->
 
+                    <!--
+                        When set, hold items details will return only available holds to the SIP client.
+                    -->
+                    <!--
+                    <option name='msg64_hold_items_available' value='true' />
+                    -->
+
 					<!--
 						If enabled, the PC field in patron-info requests will return the non-translated profile name
 					<option name='patron_type_uses_code' value='true' />
@@ -164,6 +171,4 @@
 	</institutions>
 </acsconfig>
 
-<!--
-    vim:noet:ts=4:sw=4:
--->
+<!-- vim:noet:ts=4:sw=4: -->
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm b/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm
index 9de94b82e3..98a594da84 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm
@@ -520,13 +520,17 @@ sub hold_items {
     my ($self, $start, $end, $ids_only) = @_;
     syslog('LOG_DEBUG', 'OILS: Patron->hold_items()');
 
-
     # all of my open holds
-    my $holds = $self->{editor}->search_action_hold_request({
-        usr => $self->{user}->id, 
-        fulfillment_time => undef, 
-        cancel_time => undef 
-    });
+    my $holds_query = {
+        usr => $self->{user}->id,
+        fulfillment_time => undef,
+        cancel_time => undef
+    };
+    if (OpenILS::SIP->get_option_value('msg64_hold_items_available')) {
+        # Limit to available holds.
+        $holds_query->{current_shelf_lib} = {'=' => {'+ahr' => 'pickup_lib'}};
+    }
+    my $holds = $self->{editor}->search_action_hold_request($holds_query);
 
     return $holds if $ids_only;
     return $self->__format_holds($holds, $start, $end);
diff --git a/docs/RELEASE_NOTES_NEXT/SIP/hold_items_available_option.adoc b/docs/RELEASE_NOTES_NEXT/SIP/hold_items_available_option.adoc
new file mode 100644
index 0000000000..515d7e3711
--- /dev/null
+++ b/docs/RELEASE_NOTES_NEXT/SIP/hold_items_available_option.adoc
@@ -0,0 +1,11 @@
+Option to Limit Hold Items to Available
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+A new option has been added to the SIP2 implementation configuration,
+`msg64_hold_items_available`.  When set, this option will limit the
+count and list of hold items in the SIP2 patron information response
+message (64) to only those holds that are available for pickup.  When
+not set, the full list of the patron's holds will continue to be sent.
+This option is useful because some self checks expect to receive only
+the list of available holds in the hold items and have few settings to
+control the display of holds.

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/examples/oils_sip.xml.example                   | 11 ++++++++---
 Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm          | 16 ++++++++++------
 .../SIP/hold_items_available_option.adoc                 | 11 +++++++++++
 3 files changed, 29 insertions(+), 9 deletions(-)
 create mode 100644 docs/RELEASE_NOTES_NEXT/SIP/hold_items_available_option.adoc


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list