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

(-)a/C4/Items.pm (-2 lines)
Lines 750-757 sub GetItemsInfo { Link Here
750
           holding.branchurl,
750
           holding.branchurl,
751
           holding.branchcode,
751
           holding.branchcode,
752
           holding.branchname,
752
           holding.branchname,
753
           holding.opac_info as holding_branch_opac_info,
754
           home.opac_info as home_branch_opac_info,
755
           IF(tmp_holdsqueue.itemnumber,1,0) AS has_pending_hold
753
           IF(tmp_holdsqueue.itemnumber,1,0) AS has_pending_hold
756
     FROM items
754
     FROM items
757
     LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode
755
     LEFT JOIN branches AS holding ON items.holdingbranch = holding.branchcode
(-)a/t/db_dependent/Items.t (-14 / +1 lines)
Lines 192-198 subtest 'ModItemTransfer tests' => sub { Link Here
192
192
193
subtest 'GetItemsInfo tests' => sub {
193
subtest 'GetItemsInfo tests' => sub {
194
194
195
    plan tests => 9;
195
    plan tests => 7;
196
196
197
    $schema->storage->txn_begin;
197
    $schema->storage->txn_begin;
198
198
Lines 230-250 subtest 'GetItemsInfo tests' => sub { Link Here
230
        }
230
        }
231
    )->itemnumber;
231
    )->itemnumber;
232
232
233
    my $library = Koha::Libraries->find( $library1->{branchcode} );
234
    $library->opac_info("homebranch OPAC info");
235
    $library->store;
236
237
    $library = Koha::Libraries->find( $library2->{branchcode} );
238
    $library->opac_info("holdingbranch OPAC info");
239
    $library->store;
240
241
    my @results = GetItemsInfo( $biblio->biblionumber );
233
    my @results = GetItemsInfo( $biblio->biblionumber );
242
    ok( @results, 'GetItemsInfo returns results');
234
    ok( @results, 'GetItemsInfo returns results');
243
235
244
    is( $results[0]->{ home_branch_opac_info }, "homebranch OPAC info",
245
        'GetItemsInfo returns the correct home branch OPAC info notice' );
246
    is( $results[0]->{ holding_branch_opac_info }, "holdingbranch OPAC info",
247
        'GetItemsInfo returns the correct holding branch OPAC info notice' );
248
    is( exists( $results[0]->{ onsite_checkout } ), 1,
236
    is( exists( $results[0]->{ onsite_checkout } ), 1,
249
        'GetItemsInfo returns a onsite_checkout key' );
237
        'GetItemsInfo returns a onsite_checkout key' );
250
    is( $results[0]->{ restricted }, 1,
238
    is( $results[0]->{ restricted }, 1,
251
- 

Return to bug 29144