Bugzilla – Attachment 44840 Details for
Bug 14846
Items with no holdingbranch causes user's holds display to freeze
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14846 - Items with no holdingbranch causes svc/holds to crash
Bug-14846---Items-with-no-holdingbranch-causes-svc.patch (text/plain), 1.55 KB, created by
Bouzid Fergani
on 2015-11-13 13:57:56 UTC
(
hide
)
Description:
Bug 14846 - Items with no holdingbranch causes svc/holds to crash
Filename:
MIME Type:
Creator:
Bouzid Fergani
Created:
2015-11-13 13:57:56 UTC
Size:
1.55 KB
patch
obsolete
>From e862f9102cc0859102fba9b8df5b9136ce2a8c8e Mon Sep 17 00:00:00 2001 >From: Blou <philippe.blouin@inlibro.com> >Date: Thu, 17 Sep 2015 11:33:38 -0400 >Subject: [PATCH] Bug 14846 - Items with no holdingbranch causes svc/holds to > crash > >When trying to display the holds for a user, if an item has no holdingbranch, it causes the svc/holds service to crash and the display to freeze. > >Tentative steps to reproduce on any DB: >1) put 1 or more items on hold for a given user. >2) go into the database and set the item.holdingbranch to NULL >3) In the user's page, in checkouts (circulation.pl), click the tab that should be written 1 Hold(s) >4) It will be "Processing" indefinitely. > >The cause is the svc/holds code that crashes. >The fix will validate that there's an holdingbranch before proceding with the code. >--- > svc/holds | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/svc/holds b/svc/holds >index d5f772a..50ae385 100755 >--- a/svc/holds >+++ b/svc/holds >@@ -124,8 +124,8 @@ while ( my $h = $holds_rs->next() ) { > $hold->{date_sent} = output_pref( dt_from_string($transferred_when) ); > $hold->{from_branch} = GetBranchName($transferred_from); > } >- elsif ( $item->holdingbranch()->branchcode() ne >- $h->branchcode()->branchcode() ) >+ elsif ( $item->holding_branch() && $item->holding_branch()->branchcode() ne >+ $h->branch()->branchcode() ) > { > $hold->{not_transferred} = 1; > $hold->{not_transferred_by} = $h->item()->holdingbranch()->branchname(); >-- >1.7.9.5
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 14846
:
42690
|
42691
|
44840
|
45493
|
45517