diff --git a/module/Finna/src/Finna/ILS/Driver/Quria.php b/module/Finna/src/Finna/ILS/Driver/Quria.php index 6e4d3c0702e..d6253dfb057 100644 --- a/module/Finna/src/Finna/ILS/Driver/Quria.php +++ b/module/Finna/src/Finna/ILS/Driver/Quria.php @@ -984,7 +984,8 @@ public function getMyHolds($user) $detailsStr = $reservation->id . '|' . $reservation->validFromDate . '|' . $reservation->validToDate . '|' - . $reservation->pickUpBranchId; + . $reservation->pickUpBranchId; // $reservation->pickUpBranchId actually + // contains the branch name instead of the ID $updateDetails = ''; $cancelDetails = ''; // TODO: Regional holds are not yet implemented @@ -1412,6 +1413,15 @@ public function updateHolds( if (isset($fields['pickUpLocation'])) { [, $branch] = explode('.', $fields['pickUpLocation'], 2); $updateRequest['pickUpBranchId'] = $branch; + } else { + // Map the branch name to an actual branch ID + $locations = $this->getPickUpLocations($patron, ['item_id' => $requestId]); + foreach ($locations as $loc) { + if ($loc['locationDisplay'] === $pickupLocation) { + [, $branch] = explode('.', $loc['locationID'], 2); + $updateRequest['pickUpBranchId'] = $branch; + } + } } $result = $this->doSOAPRequest( $this->reservations_wsdl,