Skip to content

Commit

Permalink
SierraRest: Check holdings also for item statuses by default. (vufind…
Browse files Browse the repository at this point in the history
…-org#3053)

This fixes a discrepancy between status information on the search results page and record holdings tab. The issue is particularly noticeable for records that only have summary holdings for storage items.
  • Loading branch information
EreMaijala authored Aug 25, 2023
1 parent 3d9ebd7 commit 2563165
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions config/vufind/SierraRest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -250,3 +250,5 @@ title_hold_excluded_item_codes = "e"
;sort_by_enum_chron = false
; Whether to retrieve and display orders (default is false):
;display_orders = false
; Whether to check holdings records in search results (default is true):
;check_holdings_in_results = true
4 changes: 2 additions & 2 deletions module/VuFind/src/VuFind/ILS/Driver/SierraRest.php
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ public function init()
*/
public function getStatus($id)
{
return $this->getItemStatusesForBib($id, false);
return $this->getItemStatusesForBib($id, $this->config['Holdings']['check_holdings_in_results'] ?? true);
}

/**
Expand All @@ -499,7 +499,7 @@ public function getStatuses($ids)
{
$items = [];
foreach ($ids as $id) {
$items[] = $this->getItemStatusesForBib($id, false);
$items[] = $this->getStatus($id);
}
return $items;
}
Expand Down

0 comments on commit 2563165

Please sign in to comment.