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

(-)a/Koha/Calendar.pm (-1 / +1 lines)
Lines 104-110 sub single_holidays { Link Here
104
    #   ...
104
    #   ...
105
    # }
105
    # }
106
106
107
    if (!$single_holidays || $ENV{NO_CACHE}) {
107
    if (!$single_holidays) {
108
        my $dbh = C4::Context->dbh;
108
        my $dbh = C4::Context->dbh;
109
        $single_holidays = {};
109
        $single_holidays = {};
110
110
(-)a/t/db_dependent/HoldsQueue.t (-4 / +2 lines)
Lines 8-14 Link Here
8
8
9
use Modern::Perl;
9
use Modern::Perl;
10
10
11
use Test::More tests => 25;
11
use Test::More tests => 26;
12
use Data::Dumper;
12
use Data::Dumper;
13
13
14
use C4::Branch;
14
use C4::Branch;
Lines 307-313 is( $holds_queue->[1]->{cardnumber}, $borrower2->{cardnumber}, "Holds queue fill Link Here
307
# and make today a holiday for MPL. When we run it again we should only
307
# and make today a holiday for MPL. When we run it again we should only
308
# have 1 row in the holds queue
308
# have 1 row in the holds queue
309
C4::Context->set_preference('HoldsQueueSkipClosed', 1);
309
C4::Context->set_preference('HoldsQueueSkipClosed', 1);
310
$ENV{NO_CACHE} = 1;
311
my $today = dt_from_string();
310
my $today = dt_from_string();
312
C4::Calendar->new( branchcode => $branchcodes[0] )->insert_single_holiday(
311
C4::Calendar->new( branchcode => $branchcodes[0] )->insert_single_holiday(
313
    day         => $today->day(),
312
    day         => $today->day(),
Lines 316-321 C4::Calendar->new( branchcode => $branchcodes[0] )->insert_single_holiday( Link Here
316
    title       => "$today",
315
    title       => "$today",
317
    description => "$today",
316
    description => "$today",
318
);
317
);
318
is( Koha::Calendar->new( branchcode => $branchcodes[0] )->is_holiday( $today ), 1, 'Is today a holiday for pickup branch' );
319
C4::HoldsQueue::CreateQueue();
319
C4::HoldsQueue::CreateQueue();
320
$holds_queue = $dbh->selectall_arrayref("SELECT * FROM tmp_holdsqueue", { Slice => {} });
320
$holds_queue = $dbh->selectall_arrayref("SELECT * FROM tmp_holdsqueue", { Slice => {} });
321
is( scalar( @$holds_queue ), 1, "Holds not filled with items from closed libraries" );
321
is( scalar( @$holds_queue ), 1, "Holds not filled with items from closed libraries" );
Lines 336-342 C4::Context->set_preference( 'HoldsQueueSkipClosed', 1 ); Link Here
336
C4::HoldsQueue::CreateQueue();
336
C4::HoldsQueue::CreateQueue();
337
$holds_queue = $dbh->selectall_arrayref("SELECT * FROM tmp_holdsqueue", { Slice => {} });
337
$holds_queue = $dbh->selectall_arrayref("SELECT * FROM tmp_holdsqueue", { Slice => {} });
338
is( scalar( @$holds_queue ), 2, "Holds not filled with items from closed libraries" );
338
is( scalar( @$holds_queue ), 2, "Holds not filled with items from closed libraries" );
339
$ENV{NO_CACHE} = 0;
340
C4::Context->set_preference( 'HoldsQueueSkipClosed', 0 );
339
C4::Context->set_preference( 'HoldsQueueSkipClosed', 0 );
341
340
342
# Bug 14297
341
# Bug 14297
343
- 

Return to bug 12803