Skip to content

Commit

Permalink
[FINNA-2726] Quria: Fix updating holds when pick up location is not c…
Browse files Browse the repository at this point in the history
…hanged (#3060)
  • Loading branch information
rajaro authored Oct 23, 2024
1 parent e502a6f commit b621d21
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion module/Finna/src/Finna/ILS/Driver/Quria.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit b621d21

Please sign in to comment.