View | Details | Raw Unified | Return to bug 26963
Collapse All | Expand All

(-)a/Koha/Biblio.pm (-1 / +1 lines)
Lines 220-226 sub pickup_locations { Link Here
220
220
221
    my @pickup_locations;
221
    my @pickup_locations;
222
    foreach my $item_of_bib ($self->items->as_list) {
222
    foreach my $item_of_bib ($self->items->as_list) {
223
        push @pickup_locations, @{ $item_of_bib->pickup_locations( {patron => $patron} ) };
223
        push @pickup_locations, @{ $item_of_bib->pickup_locations( {patron => $patron} )->as_list() };
224
    }
224
    }
225
225
226
    my %seen;
226
    my %seen;
(-)a/Koha/Item.pm (-20 / +41 lines)
Lines 530-535 sub can_be_transferred { Link Here
530
        $limittype => $limittype eq 'itemtype'
530
        $limittype => $limittype eq 'itemtype'
531
                        ? $self->effective_itemtype : $self->ccode
531
                        ? $self->effective_itemtype : $self->ccode
532
    })->count ? 0 : 1;
532
    })->count ? 0 : 1;
533
533
}
534
}
534
535
535
=head3 pickup_locations
536
=head3 pickup_locations
Lines 551-589 sub pickup_locations { Link Here
551
    my $branchitemrule =
552
    my $branchitemrule =
552
      C4::Circulation::GetBranchItemRule( $circ_control_branch, $self->itype );
553
      C4::Circulation::GetBranchItemRule( $circ_control_branch, $self->itype );
553
554
554
    my @libs;
555
    if(defined $patron) {
555
    if(defined $patron) {
556
        return \@libs if $branchitemrule->{holdallowed} == 3 && !$self->home_branch->validate_hold_sibling( {branchcode => $patron->branchcode} );
556
        return Koha::Libraries->new()->empty if $branchitemrule->{holdallowed} == 3 && !$self->home_branch->validate_hold_sibling( {branchcode => $patron->branchcode} );
557
        return \@libs if $branchitemrule->{holdallowed} == 1 && $self->home_branch->branchcode ne $patron->branchcode;
557
        return Koha::Libraries->new()->empty if $branchitemrule->{holdallowed} == 1 && $self->home_branch->branchcode ne $patron->branchcode;
558
    }
558
    }
559
559
560
    my $pickup_libraries = Koha::Libraries->search();
560
    if ($branchitemrule->{hold_fulfillment_policy} eq 'holdgroup') {
561
    if ($branchitemrule->{hold_fulfillment_policy} eq 'holdgroup') {
561
        @libs  = $self->home_branch->get_hold_libraries;
562
        $pickup_libraries = $self->home_branch->get_hold_libraries;
562
        push @libs, $self->home_branch unless scalar(@libs) > 0;
563
    } elsif ($branchitemrule->{hold_fulfillment_policy} eq 'patrongroup') {
563
    } elsif ($branchitemrule->{hold_fulfillment_policy} eq 'patrongroup') {
564
        my $plib = Koha::Libraries->find({ branchcode => $patron->branchcode});
564
        my $plib = Koha::Libraries->find({ branchcode => $patron->branchcode});
565
        @libs  = $plib->get_hold_libraries;
565
        $pickup_libraries = $plib->get_hold_libraries;
566
        push @libs, $self->home_branch unless scalar(@libs) > 0;
567
    } elsif ($branchitemrule->{hold_fulfillment_policy} eq 'homebranch') {
566
    } elsif ($branchitemrule->{hold_fulfillment_policy} eq 'homebranch') {
568
        push @libs, $self->home_branch;
567
        $pickup_libraries = Koha::Libraries->search({ branchcode => $self->homebranch });
569
    } elsif ($branchitemrule->{hold_fulfillment_policy} eq 'holdingbranch') {
568
    } elsif ($branchitemrule->{hold_fulfillment_policy} eq 'holdingbranch') {
570
        push @libs, $self->holding_branch;
569
        $pickup_libraries = Koha::Libraries->search({ branchcode => $self->holdingbranch });
571
    } else {
570
    };
572
        @libs = Koha::Libraries->search({
571
572
    return $pickup_libraries->search(
573
        {
573
            pickup_location => 1
574
            pickup_location => 1
574
        }, {
575
        },
576
        {
575
            order_by => ['branchname']
577
            order_by => ['branchname']
576
        })->as_list;
577
    }
578
579
    my @pickup_locations;
580
    foreach my $library (@libs) {
581
        if ($library->pickup_location && $self->can_be_transferred({ to => $library })) {
582
            push @pickup_locations, $library;
583
        }
578
        }
579
    ) unless C4::Context->preference('UseBranchTransferLimits');
580
581
    my $limittype = C4::Context->preference('BranchTransferLimitsType');
582
    my ($ccode, $itype) = (undef, undef);
583
    if( $limittype eq 'ccode' ){
584
        $ccode = $self->ccode;
585
    } else {
586
        $itype = $self->itype;
584
    }
587
    }
588
    my $limits = Koha::Item::Transfer::Limits->search(
589
        {
590
            fromBranch => $self->holdingbranch,
591
            ccode      => $ccode,
592
            itemtype   => $itype,
593
        },
594
        { columns => ['toBranch'] }
595
    );
585
596
586
    return \@pickup_locations;
597
    return $pickup_libraries->search(
598
        {
599
            pickup_location => 1,
600
            branchcode      => {
601
                '-not_in' => $limits->_resultset->as_query
602
            }
603
        },
604
        {
605
            order_by => ['branchname']
606
        }
607
    );
587
}
608
}
588
609
589
=head3 article_request_type
610
=head3 article_request_type
(-)a/Koha/Library.pm (-1 / +1 lines)
Lines 160-166 sub get_hold_libraries { Link Here
160
    @hold_libraries =
160
    @hold_libraries =
161
      grep { !$seen{ $_->id }++ } @hold_libraries;
161
      grep { !$seen{ $_->id }++ } @hold_libraries;
162
162
163
    return @hold_libraries;
163
    return Koha::Libraries->search({ branchcode => { '-in' => [ keys %seen ] } });
164
}
164
}
165
165
166
=head3 validate_hold_sibling
166
=head3 validate_hold_sibling
(-)a/Koha/Template/Plugin/Branches.pm (-1 / +1 lines)
Lines 117-123 sub pickup_locations { Link Here
117
        if ($item) {
117
        if ($item) {
118
            $item = Koha::Items->find($item)
118
            $item = Koha::Items->find($item)
119
              unless ref($item) eq 'Koha::Item';
119
              unless ref($item) eq 'Koha::Item';
120
            @libraries = @{ $item->pickup_locations( { patron => $patron } ) }
120
            @libraries = $item->pickup_locations( { patron => $patron } )
121
              if defined $item;
121
              if defined $item;
122
        }
122
        }
123
        elsif ($biblio) {
123
        elsif ($biblio) {
(-)a/reserve/request.pl (-1 / +1 lines)
Lines 577-583 foreach my $biblionumber (@biblionumbers) { Link Here
577
                        $item->{pickup_locations_code} = 'all';
577
                        $item->{pickup_locations_code} = 'all';
578
                    } else {
578
                    } else {
579
                        my $arr_locations = Koha::Items->find($itemnumber)
579
                        my $arr_locations = Koha::Items->find($itemnumber)
580
                                    ->pickup_locations( { patron => $patron } );
580
                                    ->pickup_locations( { patron => $patron } )->as_list();
581
581
582
                        $item->{pickup_locations} = join( ', ',
582
                        $item->{pickup_locations} = join( ', ',
583
                            map { $_->unblessed->{branchname} } @$arr_locations);
583
                            map { $_->unblessed->{branchname} } @$arr_locations);
(-)a/t/db_dependent/Koha/Item.t (-91 / +184 lines)
Lines 156-185 subtest "as_marc_field() tests" => sub { Link Here
156
};
156
};
157
157
158
subtest 'pickup_locations' => sub {
158
subtest 'pickup_locations' => sub {
159
    plan tests => 114;
159
    plan tests => 66;
160
160
161
    $schema->storage->txn_begin;
161
    $schema->storage->txn_begin;
162
162
163
    my $dbh = C4::Context->dbh;
163
    my $dbh = C4::Context->dbh;
164
164
165
    # Cleanup database
166
    Koha::Holds->search->delete;
167
    $dbh->do('DELETE FROM issues');
168
    Koha::Patrons->search->delete;
169
    Koha::Items->search->delete;
170
    Koha::Libraries->search->delete;
171
    Koha::CirculationRules->search->delete;
172
    Koha::CirculationRules->set_rules(
173
        {
174
            categorycode => undef,
175
            itemtype     => undef,
176
            branchcode   => undef,
177
            rules        => {
178
                reservesallowed => 25,
179
            }
180
        }
181
    );
182
183
    my $root1 = $builder->build_object( { class => 'Koha::Library::Groups', value => { ft_local_hold_group => 1, branchcode => undef } } );
165
    my $root1 = $builder->build_object( { class => 'Koha::Library::Groups', value => { ft_local_hold_group => 1, branchcode => undef } } );
184
    my $root2 = $builder->build_object( { class => 'Koha::Library::Groups', value => { ft_local_hold_group => 1, branchcode => undef } } );
166
    my $root2 = $builder->build_object( { class => 'Koha::Library::Groups', value => { ft_local_hold_group => 1, branchcode => undef } } );
185
    my $library1 = $builder->build_object( { class => 'Koha::Libraries', value => { pickup_location => 1, } } );
167
    my $library1 = $builder->build_object( { class => 'Koha::Libraries', value => { pickup_location => 1, } } );
Lines 192-280 subtest 'pickup_locations' => sub { Link Here
192
    my $group2_1 = $builder->build_object( { class => 'Koha::Library::Groups', value => { parent_id => $root2->id, branchcode => $library3->branchcode } } );
174
    my $group2_1 = $builder->build_object( { class => 'Koha::Library::Groups', value => { parent_id => $root2->id, branchcode => $library3->branchcode } } );
193
    my $group2_2 = $builder->build_object( { class => 'Koha::Library::Groups', value => { parent_id => $root2->id, branchcode => $library4->branchcode } } );
175
    my $group2_2 = $builder->build_object( { class => 'Koha::Library::Groups', value => { parent_id => $root2->id, branchcode => $library4->branchcode } } );
194
176
195
    my $biblioitem  = $builder->build( { source => 'Biblioitem' } );
177
    our @branchcodes = (
196
178
        $library1->branchcode, $library2->branchcode,
197
    my $item1  = Koha::Item->new({
179
        $library3->branchcode, $library4->branchcode
198
        biblionumber     => $biblioitem->{biblionumber},
180
    );
199
        biblioitemnumber => $biblioitem->{biblioitemnumber},
181
200
        homebranch       => $library1->branchcode,
182
    my $item1 = $builder->build_sample_item(
201
        holdingbranch    => $library2->branchcode,
183
        {
202
        barcode          => '1',
184
            homebranch    => $library1->branchcode,
203
        itype            => 'test',
185
            holdingbranch => $library2->branchcode,
204
    })->store;
186
            copynumber    => 1,
205
187
            ccode         => 'Gollum'
206
    my $item3  = Koha::Item->new({
188
        }
207
        biblionumber     => $biblioitem->{biblionumber},
189
    )->store;
208
        biblioitemnumber => $biblioitem->{biblioitemnumber},
190
209
        homebranch       => $library3->branchcode,
191
    my $item3 = $builder->build_sample_item(
210
        holdingbranch    => $library4->branchcode,
192
        {
211
        barcode          => '3',
193
            homebranch    => $library3->branchcode,
212
        itype            => 'test',
194
            holdingbranch => $library4->branchcode,
213
    })->store;
195
            copynumber    => 3,
196
            itype         => $item1->itype,
197
        }
198
    )->store;
199
200
    Koha::CirculationRules->set_rules(
201
        {
202
            categorycode => undef,
203
            itemtype     => $item1->itype,
204
            branchcode   => undef,
205
            rules        => {
206
                reservesallowed => 25,
207
            }
208
        }
209
    );
210
214
211
215
    my $patron1 = $builder->build_object( { class => 'Koha::Patrons', value => { branchcode => $library1->branchcode, firstname => '1' } } );
212
    my $patron1 = $builder->build_object( { class => 'Koha::Patrons', value => { branchcode => $library1->branchcode, firstname => '1' } } );
216
    my $patron4 = $builder->build_object( { class => 'Koha::Patrons', value => { branchcode => $library4->branchcode, firstname => '4' } } );
213
    my $patron4 = $builder->build_object( { class => 'Koha::Patrons', value => { branchcode => $library4->branchcode, firstname => '4' } } );
217
214
215
    my $all_count = Koha::Libraries->search({ pickup_location => 1})->count();
216
218
    my $results = {
217
    my $results = {
219
        "1-1-1-any" => 3,
218
        "1-1-1-any"           => $all_count,
220
        "1-1-1-holdgroup" => 2,
219
        "1-1-1-holdgroup"     => 2,
221
        "1-1-1-patrongroup" => 2,
220
        "1-1-1-patrongroup"   => 2,
222
        "1-1-1-homebranch" => 1,
221
        "1-1-1-homebranch"    => 1,
223
        "1-1-1-holdingbranch" => 1,
222
        "1-1-1-holdingbranch" => 1,
224
        "1-1-2-any" => 3,
223
        "1-1-2-any"           => $all_count,
225
        "1-1-2-holdgroup" => 2,
224
        "1-1-2-holdgroup"     => 2,
226
        "1-1-2-patrongroup" => 2,
225
        "1-1-2-patrongroup"   => 2,
227
        "1-1-2-homebranch" => 1,
226
        "1-1-2-homebranch"    => 1,
228
        "1-1-2-holdingbranch" => 1,
227
        "1-1-2-holdingbranch" => 1,
229
        "1-1-3-any" => 3,
228
        "1-1-3-any"           => $all_count,
230
        "1-1-3-holdgroup" => 2,
229
        "1-1-3-holdgroup"     => 2,
231
        "1-1-3-patrongroup" => 2,
230
        "1-1-3-patrongroup"   => 2,
232
        "1-1-3-homebranch" => 1,
231
        "1-1-3-homebranch"    => 1,
233
        "1-1-3-holdingbranch" => 1,
232
        "1-1-3-holdingbranch" => 1,
234
        "1-4-1-any" => 0,
233
        "1-4-1-any"           => 0,
235
        "1-4-1-holdgroup" => 0,
234
        "1-4-1-holdgroup"     => 0,
236
        "1-4-1-patrongroup" => 0,
235
        "1-4-1-patrongroup"   => 0,
237
        "1-4-1-homebranch" => 0,
236
        "1-4-1-homebranch"    => 0,
238
        "1-4-1-holdingbranch" => 0,
237
        "1-4-1-holdingbranch" => 0,
239
        "1-4-2-any" => 3,
238
        "1-4-2-any"           => $all_count,
240
        "1-4-2-holdgroup" => 2,
239
        "1-4-2-holdgroup"     => 2,
241
        "1-4-2-patrongroup" => 1,
240
        "1-4-2-patrongroup"   => 1,
242
        "1-4-2-homebranch" => 1,
241
        "1-4-2-homebranch"    => 1,
243
        "1-4-2-holdingbranch" => 1,
242
        "1-4-2-holdingbranch" => 1,
244
        "1-4-3-any" => 0,
243
        "1-4-3-any"           => 0,
245
        "1-4-3-holdgroup" => 0,
244
        "1-4-3-holdgroup"     => 0,
246
        "1-4-3-patrongroup" => 0,
245
        "1-4-3-patrongroup"   => 0,
247
        "1-4-3-homebranch" => 0,
246
        "1-4-3-homebranch"    => 0,
248
        "1-4-3-holdingbranch" => 0,
247
        "1-4-3-holdingbranch" => 0,
249
        "3-1-1-any" => 0,
248
        "3-1-1-any"           => 0,
250
        "3-1-1-holdgroup" => 0,
249
        "3-1-1-holdgroup"     => 0,
251
        "3-1-1-patrongroup" => 0,
250
        "3-1-1-patrongroup"   => 0,
252
        "3-1-1-homebranch" => 0,
251
        "3-1-1-homebranch"    => 0,
253
        "3-1-1-holdingbranch" => 0,
252
        "3-1-1-holdingbranch" => 0,
254
        "3-1-2-any" => 3,
253
        "3-1-2-any"           => $all_count,
255
        "3-1-2-holdgroup" => 1,
254
        "3-1-2-holdgroup"     => 1,
256
        "3-1-2-patrongroup" => 2,
255
        "3-1-2-patrongroup"   => 2,
257
        "3-1-2-homebranch" => 0,
256
        "3-1-2-homebranch"    => 0,
258
        "3-1-2-holdingbranch" => 1,
257
        "3-1-2-holdingbranch" => 1,
259
        "3-1-3-any" => 0,
258
        "3-1-3-any"           => 0,
260
        "3-1-3-holdgroup" => 0,
259
        "3-1-3-holdgroup"     => 0,
261
        "3-1-3-patrongroup" => 0,
260
        "3-1-3-patrongroup"   => 0,
262
        "3-1-3-homebranch" => 0,
261
        "3-1-3-homebranch"    => 0,
263
        "3-1-3-holdingbranch" => 0,
262
        "3-1-3-holdingbranch" => 0,
264
        "3-4-1-any" => 0,
263
        "3-4-1-any"           => 0,
265
        "3-4-1-holdgroup" => 0,
264
        "3-4-1-holdgroup"     => 0,
266
        "3-4-1-patrongroup" => 0,
265
        "3-4-1-patrongroup"   => 0,
267
        "3-4-1-homebranch" => 0,
266
        "3-4-1-homebranch"    => 0,
268
        "3-4-1-holdingbranch" => 0,
267
        "3-4-1-holdingbranch" => 0,
269
        "3-4-2-any" => 3,
268
        "3-4-2-any"           => $all_count,
270
        "3-4-2-holdgroup" => 1,
269
        "3-4-2-holdgroup"     => 1,
271
        "3-4-2-patrongroup" => 1,
270
        "3-4-2-patrongroup"   => 1,
272
        "3-4-2-homebranch" => 0,
271
        "3-4-2-homebranch"    => 0,
273
        "3-4-2-holdingbranch" => 1,
272
        "3-4-2-holdingbranch" => 1,
274
        "3-4-3-any" => 3,
273
        "3-4-3-any"           => $all_count,
275
        "3-4-3-holdgroup" => 1,
274
        "3-4-3-holdgroup"     => 1,
276
        "3-4-3-patrongroup" => 1,
275
        "3-4-3-patrongroup"   => 1,
277
        "3-4-3-homebranch" => 0,
276
        "3-4-3-homebranch"    => 0,
278
        "3-4-3-holdingbranch" => 1
277
        "3-4-3-holdingbranch" => 1
279
    };
278
    };
280
279
Lines 292-312 subtest 'pickup_locations' => sub { Link Here
292
                }
291
                }
293
            }
292
            }
294
        );
293
        );
295
        my @pl = @{ $item->pickup_locations( { patron => $patron} ) };
294
        my @pl = $item->pickup_locations( { patron => $patron} )->as_list;
296
        my $ha_value=$ha==3?'holdgroup':($ha==2?'any':'homebranch');
295
        my $ha_value=$ha==3?'holdgroup':($ha==2?'any':'homebranch');
297
296
298
        foreach my $pickup_location (@pl) {
297
        foreach my $pickup_location (@pl) {
298
            next
299
                unless grep { $pickup_location eq $_ } @branchcodes;
299
            is( ref($pickup_location), 'Koha::Library', 'Object type is correct' );
300
            is( ref($pickup_location), 'Koha::Library', 'Object type is correct' );
300
        }
301
        }
301
        ok(
302
        ok(
302
            scalar(@pl) == $results->{
303
            scalar(@pl) == $results->{
303
                    $item->barcode . '-'
304
                    $item->copynumber . '-'
304
                  . $patron->firstname . '-'
305
                  . $patron->firstname . '-'
305
                  . $ha . '-'
306
                  . $ha . '-'
306
                  . $hfp
307
                  . $hfp
307
            },
308
            },
308
            'item'
309
            'item'
309
              . $item->barcode
310
              . $item->copynumber
310
              . ', patron'
311
              . ', patron'
311
              . $patron->firstname
312
              . $patron->firstname
312
              . ', holdallowed: '
313
              . ', holdallowed: '
Lines 315-326 subtest 'pickup_locations' => sub { Link Here
315
              . $hfp
316
              . $hfp
316
              . ' should return '
317
              . ' should return '
317
              . $results->{
318
              . $results->{
318
                    $item->barcode . '-'
319
                    $item->copynumber . '-'
319
                  . $patron->firstname . '-'
320
                  . $patron->firstname . '-'
320
                  . $ha . '-'
321
                  . $ha . '-'
321
                  . $hfp
322
                  . $hfp
322
              }
323
              }
323
              . ' but returns '
324
              . ' and returns '
324
              . scalar(@pl)
325
              . scalar(@pl)
325
        );
326
        );
326
327
Lines 338-343 subtest 'pickup_locations' => sub { Link Here
338
        }
339
        }
339
    }
340
    }
340
341
342
    # Now test that branchtransferlimits will further filter the pickup locations
343
344
    my $item_no_ccode = $builder->build_sample_item(
345
        {
346
            homebranch    => $library1->branchcode,
347
            holdingbranch => $library2->branchcode,
348
            itype         => $item1->itype,
349
        }
350
    )->store;
351
352
    t::lib::Mocks::mock_preference('UseBranchTransferLimits', 1);
353
    t::lib::Mocks::mock_preference('BranchTransferLimitsType', 'itemtype');
354
    Koha::CirculationRules->set_rules(
355
        {
356
            branchcode => undef,
357
            itemtype   => $item1->itype,
358
            rules      => {
359
                holdallowed             => 1,
360
                hold_fulfillment_policy => 1,
361
                returnbranch            => 'any'
362
            }
363
        }
364
    );
365
    $builder->build_object(
366
        {
367
            class => 'Koha::Item::Transfer::Limits',
368
            value => {
369
                toBranch   => $library1->branchcode,
370
                fromBranch => $library2->branchcode,
371
                itemtype   => $item1->itype,
372
                ccode      => undef,
373
            }
374
        }
375
    );
376
377
    my $pickup_locations = $item1->pickup_locations( { patron => $patron1 } )->as_list;
378
    is( scalar @$pickup_locations, $all_count - 1, "With a transfer limits we get back the libraries that are pickup locations minus 1 limited library");
379
380
    $builder->build_object(
381
        {
382
            class => 'Koha::Item::Transfer::Limits',
383
            value => {
384
                toBranch   => $library4->branchcode,
385
                fromBranch => $library2->branchcode,
386
                itemtype   => $item1->itype,
387
                ccode      => undef,
388
            }
389
        }
390
    );
391
392
    $pickup_locations = $item1->pickup_locations( { patron => $patron1 } )->as_list;
393
    is( scalar @$pickup_locations, $all_count - 2, "With 2 transfer limits we get back the libraries that are pickup locations minus 2 limited libraries");
394
395
    t::lib::Mocks::mock_preference('BranchTransferLimitsType', 'ccode');
396
    $pickup_locations = $item1->pickup_locations( { patron => $patron1 } )->as_list;
397
    is( scalar @$pickup_locations, $all_count, "With no transfer limits of type ccode we get back the libraries that are pickup locations");
398
399
    $pickup_locations = $item_no_ccode->pickup_locations( { patron => $patron1 } )->as_list;
400
    is( scalar @$pickup_locations, $all_count, "With no transfer limits of type ccode and an item with no ccode we get back the libraries that are pickup locations");
401
402
    $builder->build_object(
403
        {
404
            class => 'Koha::Item::Transfer::Limits',
405
            value => {
406
                toBranch   => $library2->branchcode,
407
                fromBranch => $library2->branchcode,
408
                itemtype   => undef,
409
                ccode      => $item1->ccode,
410
            }
411
        }
412
    );
413
414
    $pickup_locations = $item1->pickup_locations( { patron => $patron1 } )->as_list;
415
    is( scalar @$pickup_locations, $all_count - 1, "With a transfer limits we get back the libraries that are pickup locations minus 1 limited library");
416
417
    $builder->build_object(
418
        {
419
            class => 'Koha::Item::Transfer::Limits',
420
            value => {
421
                toBranch   => $library4->branchcode,
422
                fromBranch => $library2->branchcode,
423
                itemtype   => undef,
424
                ccode      => $item1->ccode,
425
            }
426
        }
427
    );
428
429
    $pickup_locations = $item1->pickup_locations( { patron => $patron1 } )->as_list;
430
    is( scalar @$pickup_locations, $all_count - 2, "With 2 transfer limits we get back the libraries that are pickup locations minus 2 limited libraries");
431
432
    t::lib::Mocks::mock_preference('UseBranchTransferLimits', 0);
433
341
    $schema->storage->txn_rollback;
434
    $schema->storage->txn_rollback;
342
};
435
};
343
436
(-)a/t/db_dependent/Template/Plugin/Branches.t (-2 / +2 lines)
Lines 137-143 subtest 'pickup_locations() tests' => sub { Link Here
137
    $item_class->mock(
137
    $item_class->mock(
138
        'pickup_locations',
138
        'pickup_locations',
139
        sub {
139
        sub {
140
            return [$library_1];
140
            return Koha::Libraries->search(
141
                { branchcode => $library_1->branchcode } );
141
        }
142
        }
142
    );
143
    );
143
144
144
- 

Return to bug 26963