<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' />
</institutions>
</acsconfig>
-<!--
- vim:noet:ts=4:sw=4:
--->
+<!-- vim:noet:ts=4:sw=4: -->
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);
--- /dev/null
+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.