Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FINNA-2726] Quria: Fix updating holds when pick up location is not changed #3060

Merged
merged 4 commits into from
Oct 23, 2024

Conversation

rajaro
Copy link

@rajaro rajaro commented Oct 21, 2024

No description provided.

@@ -1412,6 +1412,14 @@ public function updateHolds(
if (isset($fields['pickUpLocation'])) {
[, $branch] = explode('.', $fields['pickUpLocation'], 2);
$updateRequest['pickUpBranchId'] = $branch;
} else {
$locations = $this->getPickUpLocations($patron, ['item_id' => $requestId]);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mitä tässä tapahtuu? Eikö $pickupLocation sisällä jo nykyisen pickUpBranchId:n (riviltä 987)? Miksei sitä voi käyttää suoraan?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ei. Toi rivin 987 $reservation->pickUpBranchId antaa käytännössä esim. "Palosaaren kirjasto" eli locationDisplay:n

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No sehän onkin sitten ihan tosi outo. Lisäisitkö vaikka molempiin kohtiin vielä kommentit, niin ei tarvitsisi ihmetellä? Tyyliin // $reservation->pickUpBranchId actually contains the branch name instead of the ID riville 987 ja // Map the branch name to an actual branch ID tähän uuteen.

@EreMaijala EreMaijala merged commit b621d21 into NatLibFi:dev Oct 23, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants