Bugzilla – Attachment 123278 Details for
Bug 28057
Confusion of biblionumber and biblioitemnumber in request.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28057: Use the biblioitem's biblionumber for checking availability
Bug-28057-Use-the-biblioitems-biblionumber-for-che.patch (text/plain), 2.51 KB, created by
Joonas Kylmälä
on 2021-07-29 09:31:45 UTC
(
hide
)
Description:
Bug 28057: Use the biblioitem's biblionumber for checking availability
Filename:
MIME Type:
Creator:
Joonas Kylmälä
Created:
2021-07-29 09:31:45 UTC
Size:
2.51 KB
patch
obsolete
>From d5e10a7404cb86f1eed2a32ae3ab61d9afda00f6 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 14 Apr 2021 18:19:40 +0000 >Subject: [PATCH] Bug 28057: Use the biblioitem's biblionumber for checking > availability >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >The loop here gets items from the record, plus analytic items. Because of this >we need to check more than 1 record - we decide to do this via biblioitems. > >We need to preserve that, but when checking ItemsAnyAvailableAndNotRestricted we >cannot assume that the biblionumber and biblioitemnumber are the same (they should be >but this may not be the best of all possible worlds) > >I simply switch the call here > >To test: >1 - Apply patch >2 - Test placing holds on single bibs and multiple bibs >3 - Confirm it works as expected > >Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com> >Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> >--- > reserve/request.pl | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > >diff --git a/reserve/request.pl b/reserve/request.pl >index a6fbe528f4..1a027d26e2 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -402,8 +402,8 @@ foreach my $biblionumber (@biblionumbers) { > $biblioloopiter{noitems} = 1; > } > >- ## Here we go backwards again to create hash of biblioitemnumber to itemnumbers, >- ## when by definition all of the itemnumber have the same biblioitemnumber >+ ## Here we go backwards again to create hash of biblioitemnumber to itemnumbers >+ ## this is important when we have analytic items which may be on another record > my ( $iteminfos_of ); > while ( my $item = $items->next ) { > $item = $item->unblessed; >@@ -413,7 +413,6 @@ foreach my $biblionumber (@biblionumbers) { > $iteminfos_of->{$itemnumber} = $item; > } > >- ## Should be same as biblionumber > my @biblioitemnumbers = keys %itemnumbers_of_biblioitem; > > my $biblioiteminfos_of = { >@@ -461,7 +460,7 @@ foreach my $biblionumber (@biblionumbers) { > # (before this loop was inside that sub loop so it was O(n^2) ) > my $items_any_available; > >- $items_any_available = ItemsAnyAvailableAndNotRestricted( { biblionumber => $biblioitemnumber, patron => $patron }) >+ $items_any_available = ItemsAnyAvailableAndNotRestricted( { biblionumber => $biblioitem->{biblionumber}, patron => $patron }) > if $patron; > > foreach my $itemnumber ( @{ $itemnumbers_of_biblioitem{$biblioitemnumber} } ) { >-- >2.25.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28057
:
119598
|
123250
|
123266
| 123278 |
123279