Summary: | Incorrect default pickup location passed to HTML, causing UI show items unreservable | ||
---|---|---|---|
Product: | Koha | Reporter: | Joonas Kylmälä <joonas.kylmala> |
Component: | Hold requests | Assignee: | Peter Vashchuk <stalkernoid> |
Status: | ASSIGNED --- | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | gmcharlt, jonathan.druart, nugged, stalkernoid, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28338 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Bug Depends on: | 27071 | ||
Bug Blocks: |
Description
Joonas Kylmälä
2021-06-10 12:17:43 UTC
Actually... On further thought I don't think that is the explanation for the triangles. I don't think we can use the GetReservesControlBranch to get the default pickup location as was changed in bug 27071 because that doesn't give us a branch with pickup option necessarely. The case we have is that the patrons/item's GetReservesControlBranch returns a branch where you cannot go pickup the item. We would need to be able to fallback to some other branch where pickup is possible I think. I think I found a solution: Let's similary fetch the possible pickup locations like we do in request.tt:
> [% PROCESS options_for_libraries libraries => Branches.pickup_locations({ search_params => { biblio => biblionumber, patron => patron }, selected => pickup }) %]
And if the request.pl gets called without a pickup location then let's call Koha::Template::Plugin::Branches::pickup_locations($biblionumber, $patron) to get one. This gets a valid pickup location selected in the holds page and if the branch is wrong the user can change it.
Tomas, can you take a look at this bug please? Ping! |