Skip to content
Snippets Groups Projects
Commit 1e6c97ed authored by Ere Maijala's avatar Ere Maijala Committed by Demian Katz
Browse files

SierraRest: Fix canceling holds and display of position in hold queue. (#1271)

parent 5b45ed8a
No related merge requests found
...@@ -783,7 +783,7 @@ class SierraRest extends AbstractBase implements TranslatorAwareInterface, ...@@ -783,7 +783,7 @@ class SierraRest extends AbstractBase implements TranslatorAwareInterface,
$position = $entry['priorityQueueLength'] . ' / ' $position = $entry['priorityQueueLength'] . ' / '
. $entry['priorityQueueLength']; . $entry['priorityQueueLength'];
} else { } else {
$position = ($entry['priority'] + 1) . ' / ' $position = $entry['priority'] . ' / '
. $entry['priorityQueueLength']; . $entry['priorityQueueLength'];
} }
$lastPickup = !empty($entry['pickupByDate']) $lastPickup = !empty($entry['pickupByDate'])
...@@ -826,7 +826,7 @@ class SierraRest extends AbstractBase implements TranslatorAwareInterface, ...@@ -826,7 +826,7 @@ class SierraRest extends AbstractBase implements TranslatorAwareInterface,
public function getCancelHoldDetails($holdDetails) public function getCancelHoldDetails($holdDetails)
{ {
return $holdDetails['available'] || $holdDetails['in_transit'] ? '' return $holdDetails['available'] || $holdDetails['in_transit'] ? ''
: $holdDetails['item_id']; : $holdDetails['requestId'];
} }
/** /**
...@@ -849,7 +849,7 @@ class SierraRest extends AbstractBase implements TranslatorAwareInterface, ...@@ -849,7 +849,7 @@ class SierraRest extends AbstractBase implements TranslatorAwareInterface,
foreach ($details as $holdId) { foreach ($details as $holdId) {
$result = $this->makeRequest( $result = $this->makeRequest(
['v5', 'patrons', 'holds', $holdId], [], 'DELETE', $patron ['v5', 'patrons', 'holds', $holdId], '', 'DELETE', $patron
); );
if (!empty($result['code'])) { if (!empty($result['code'])) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment