Bugzilla – Attachment 154738 Details for
Bug 34609
Holds history errors 500 if old_reserves.biblionumber is NULL
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34609: Return empty if no biblionumber
Bug-34609-Return-empty-if-no-biblionumber.patch (text/plain), 1.33 KB, created by
Pedro Amorim
on 2023-08-24 13:54:37 UTC
(
hide
)
Description:
Bug 34609: Return empty if no biblionumber
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2023-08-24 13:54:37 UTC
Size:
1.33 KB
patch
obsolete
>From d0769f0565c2e8e54131d25f980823acaba714a1 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Thu, 24 Aug 2023 13:54:19 +0000 >Subject: [PATCH] Bug 34609: Return empty if no biblionumber > >Test plan, clean k-t-d: > >1) Add a reserve to koha/koha user, mysql run: >insert into reserves(borrowernumber, reservedate, branchcode, cancellationdate, timestamp, biblionumber) >VALUES (51, '2022-09-23', 'CPL', '2022-09-23', '2022-09-23 15:46:21', 76); > >2) Add an old_reserve to koha/koha user, mysql run: >insert into old_reserves(borrowernumber, reservedate, branchcode, cancellationdate, timestamp, reserve_id) >VALUES (51, '2022-09-23', 'CPL', '2022-09-23', '2022-09-23 15:46:21', 1); > >3) Visit holdshistory on either OPAC (requires OPACHoldsHistory sys pref) or STAFF >STAFF/cgi-bin/koha/members/holdshistory.pl?borrowernumber=1 >OPAC//cgi-bin/koha/opac-holdshistory.pl > >4) Notice it blows up with a 500 error >5) Repeat step 3 >--- > Koha/Hold.pm | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/Koha/Hold.pm b/Koha/Hold.pm >index f275530d97..67e411ab53 100644 >--- a/Koha/Hold.pm >+++ b/Koha/Hold.pm >@@ -517,6 +517,7 @@ Returns the related Koha::Biblio object for this hold > sub biblio { > my ($self) = @_; > my $rs = $self->_result->biblionumber; >+ return unless $rs; > return Koha::Biblio->_new_from_dbic($rs); > } > >-- >2.30.2
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 34609
:
154738
|
154901
|
154952
|
154953
|
154954
|
154993
|
154994
|
154995