Bugzilla – Attachment 113586 Details for
Bug 26963
Improve Koha::Item::pickup_locations performance
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26963: Ignore existing libraries
Bug-26963-Ignore-existing-libraries.patch (text/plain), 1.97 KB, created by
Jonathan Druart
on 2020-11-13 08:43:26 UTC
(
hide
)
Description:
Bug 26963: Ignore existing libraries
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-11-13 08:43:26 UTC
Size:
1.97 KB
patch
obsolete
>From 4bb6198f73cb22eb5e733fb41b77135a176be431 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 13 Nov 2020 09:23:51 +0100 >Subject: [PATCH] Bug 26963: Ignore existing libraries > >--- > t/db_dependent/Koha/Item.t | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Item.t b/t/db_dependent/Koha/Item.t >index 97fe8400c7..10c5f1dff3 100755 >--- a/t/db_dependent/Koha/Item.t >+++ b/t/db_dependent/Koha/Item.t >@@ -156,6 +156,7 @@ subtest "as_marc_field() tests" => sub { > }; > > subtest 'pickup_locations' => sub { >+ plan tests => 66; > > $schema->storage->txn_begin; > >@@ -173,6 +174,10 @@ subtest 'pickup_locations' => sub { > my $group2_1 = $builder->build_object( { class => 'Koha::Library::Groups', value => { parent_id => $root2->id, branchcode => $library3->branchcode } } ); > my $group2_2 = $builder->build_object( { class => 'Koha::Library::Groups', value => { parent_id => $root2->id, branchcode => $library4->branchcode } } ); > >+ our @branchcodes = ( >+ $library1->branchcode, $library2->branchcode, >+ $library3->branchcode, $library4->branchcode >+ ); > > my $item1 = $builder->build_sample_item( > { >@@ -208,7 +213,6 @@ subtest 'pickup_locations' => sub { > my $patron4 = $builder->build_object( { class => 'Koha::Patrons', value => { branchcode => $library4->branchcode, firstname => '4' } } ); > > my $all_count = Koha::Libraries->search({ pickup_location => 1})->count(); >- plan tests => ($all_count +1) * 7 + 31 + 61; > > my $results = { > "1-1-1-any" => $all_count, >@@ -291,6 +295,8 @@ subtest 'pickup_locations' => sub { > my $ha_value=$ha==3?'holdgroup':($ha==2?'any':'homebranch'); > > foreach my $pickup_location (@pl) { >+ next >+ unless grep { $pickup_location eq $_ } @branchcodes; > is( ref($pickup_location), 'Koha::Library', 'Object type is correct' ); > } > ok( >-- >2.20.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 26963
:
113282
|
113283
|
113329
|
113330
|
113333
|
113339
|
113340
|
113419
|
113420
|
113422
|
113423
|
113424
|
113425
|
113451
|
113452
|
113453
|
113454
|
113455
|
113480
|
113481
|
113483
|
113498
|
113503
|
113504
|
113505
|
113506
|
113507
|
113508
|
113509
|
113510
|
113511
|
113512
|
113513
|
113514
|
113515
|
113516
|
113517
|
113518
|
113519
|
113520
|
113521
|
113523
|
113524
|
113525
|
113526
|
113527
|
113528
|
113529
|
113530
|
113531
| 113586 |
113729