Bugzilla – Attachment 164238 Details for
Bug 36317
Koha::Biblio->host_items fails with search_ordered()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36317: Add unit test
0001-Bug-36317-Add-unit-test.patch (text/plain), 1.87 KB, created by
Emmi Takkinen
on 2024-04-02 08:34:58 UTC
(
hide
)
Description:
Bug 36317: Add unit test
Filename:
MIME Type:
Creator:
Emmi Takkinen
Created:
2024-04-02 08:34:58 UTC
Size:
1.87 KB
patch
obsolete
>From 4a946bcae81c69e9987f2687a4c178021b1c3722 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Mon, 18 Mar 2024 15:18:27 +0100 >Subject: [PATCH 1/2] Bug 36317: Add unit test > >If fails it shows : >DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Column 'itemnumber' in where clause is ambiguous at /kohadevbox/koha/Koha/Objects.pm line 399 > >Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi> >--- > t/db_dependent/Koha/Biblio.t | 23 ++++++++++++++++++++++- > 1 file changed, 22 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Biblio.t b/t/db_dependent/Koha/Biblio.t >index d6cd9995d4..48f6e4b09d 100755 >--- a/t/db_dependent/Koha/Biblio.t >+++ b/t/db_dependent/Koha/Biblio.t >@@ -1168,7 +1168,7 @@ subtest 'get_marc_notes() UNIMARC tests' => sub { > }; > > subtest 'host_items() tests' => sub { >- plan tests => 7; >+ plan tests => 8; > > $schema->storage->txn_begin; > >@@ -1199,6 +1199,27 @@ subtest 'host_items() tests' => sub { > is_deeply( [ $host_items->get_column('itemnumber') ], > [ $host_item_1->itemnumber, $host_item_2->itemnumber ] ); > >+ my $transfer = $builder->build_object( >+ { >+ class => 'Koha::Item::Transfers', >+ value => { >+ itemnumber => $host_item_1->itemnumber, >+ frombranch => $host_item_1->holdingbranch, >+ } >+ } >+ ); >+ ok( >+ $host_items->search( >+ {}, >+ { >+ join => 'branchtransfers', >+ order_by => 'branchtransfers.daterequested' >+ } >+ )->as_list, >+ "host_items can be used with a join query on itemnumber" >+ ); >+ $transfer->delete; >+ > t::lib::Mocks::mock_preference( 'EasyAnalyticalRecords', 0 ); > $host_items = $biblio->host_items; > is( ref($host_items), 'Koha::Items' ); >-- >2.34.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 36317
:
163131
|
163155
|
163334
|
163335
|
163338
|
164238
|
164239
|
173432
|
173433