Bugzilla – Attachment 156234 Details for
Bug 34918
Koha/Items.t crashes on missing borrower 42 or 51
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34918: Fix hardcoded borrowernumber 42
Bug-34918-Fix-hardcoded-borrowernumber-42.patch (text/plain), 1.27 KB, created by
Marcel de Rooy
on 2023-09-26 14:42:53 UTC
(
hide
)
Description:
Bug 34918: Fix hardcoded borrowernumber 42
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-09-26 14:42:53 UTC
Size:
1.27 KB
patch
obsolete
>From afcdc1803941360ea8ad4b9100c5ff76d32b58f9 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Tue, 26 Sep 2023 14:42:08 +0000 >Subject: [PATCH] Bug 34918: Fix hardcoded borrowernumber 42 >Content-Type: text/plain; charset=utf-8 > >Test plan: >Run t/db_dependent/Koha/Item.t >--- > t/db_dependent/Koha/Item.t | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Item.t b/t/db_dependent/Koha/Item.t >index 9552eb8adf..cecf78d44f 100755 >--- a/t/db_dependent/Koha/Item.t >+++ b/t/db_dependent/Koha/Item.t >@@ -360,8 +360,10 @@ subtest 'has_pending_hold() tests' => sub { > my $dbh = C4::Context->dbh; > my $item = $builder->build_sample_item({ itemlost => 0 }); > my $itemnumber = $item->itemnumber; >+ my $patron = $builder->build_object( { class => 'Koha::Patrons' } ); >+ my $borrowernumber = $patron->id; > >- $dbh->do("INSERT INTO tmp_holdsqueue (surname,borrowernumber,itemnumber) VALUES ('Clamp',42,$itemnumber)"); >+ $dbh->do("INSERT INTO tmp_holdsqueue (surname,borrowernumber,itemnumber) VALUES ('Clamp',$borrowernumber,$itemnumber)"); > ok( $item->has_pending_hold, "Yes, we have a pending hold"); > $dbh->do("DELETE FROM tmp_holdsqueue WHERE itemnumber=$itemnumber"); > $item->discard_changes; >-- >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 34918
:
156234
|
156281
|
156282
|
156382
|
156383