Bugzilla – Attachment 156382 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.33 KB, created by
Katrin Fischer
on 2023-09-29 11:35:15 UTC
(
hide
)
Description:
Bug 34918: Fix hardcoded borrowernumber 42
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-09-29 11:35:15 UTC
Size:
1.33 KB
patch
obsolete
>From 0fc023318370dd2ccc4d97213b4825afe7ec09e3 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 > >Test plan: >Run t/db_dependent/Koha/Item.t > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> >--- > t/db_dependent/Koha/Item.t | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Item.t b/t/db_dependent/Koha/Item.t >index 9552eb8adf..28a723e49c 100755 >--- a/t/db_dependent/Koha/Item.t >+++ b/t/db_dependent/Koha/Item.t >@@ -361,7 +361,11 @@ subtest 'has_pending_hold() tests' => sub { > my $item = $builder->build_sample_item({ itemlost => 0 }); > my $itemnumber = $item->itemnumber; > >- $dbh->do("INSERT INTO tmp_holdsqueue (surname,borrowernumber,itemnumber) VALUES ('Clamp',42,$itemnumber)"); >+ my $patron = $builder->build_object( { class => 'Koha::Patrons' } ); >+ my $borrowernumber = $patron->id; >+ >+ $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