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

(-)a/C4/HoldsQueue.pm (-2 / +2 lines)
Lines 224-230 sub GetBibsWithPendingHoldRequests { Link Here
224
                     FROM reserves
224
                     FROM reserves
225
                     WHERE found IS NULL
225
                     WHERE found IS NULL
226
                     AND priority > 0
226
                     AND priority > 0
227
                     AND reservedate <= CURRENT_DATE()
227
                     AND reservedate <= CURRENT_TIMESTAMP()
228
                     AND suspend = 0
228
                     AND suspend = 0
229
                     ";
229
                     ";
230
    my $sth = $dbh->prepare($bib_query);
230
    my $sth = $dbh->prepare($bib_query);
Lines 268-274 sub GetPendingHoldRequestsForBib { Link Here
268
                         WHERE biblionumber = ?
268
                         WHERE biblionumber = ?
269
                         AND found IS NULL
269
                         AND found IS NULL
270
                         AND priority > 0
270
                         AND priority > 0
271
                         AND reservedate <= CURRENT_DATE()
271
                         AND reservedate <= CURRENT_TIMESTAMP()
272
                         AND suspend = 0
272
                         AND suspend = 0
273
                         ORDER BY priority";
273
                         ORDER BY priority";
274
    my $sth = $dbh->prepare($request_query);
274
    my $sth = $dbh->prepare($request_query);
(-)a/C4/Reserves.pm (-4 / +27 lines)
Lines 200-206 sub AddReserve { Link Here
200
    my $non_priority   = $params->{non_priority};
200
    my $non_priority   = $params->{non_priority};
201
    my $item_group_id  = $params->{item_group_id};
201
    my $item_group_id  = $params->{item_group_id};
202
202
203
    $resdate ||= dt_from_string;
203
    if ( C4::Context->preference('HourBasedHolds') ){
204
        if ( $resdate ){
205
            $resdate = dt_from_string( $resdate );
206
        } else {
207
            $resdate = dt_from_string();
208
        }
209
        if ( $expdate ){
210
            $expdate = dt_from_string( $expdate );
211
        }
212
    } else {
213
        # add hour and minute components
214
        if ( $resdate ){
215
            $resdate = dt_from_string( $resdate )->set({ hour => 00, minute => 00, second => 00 });
216
        } else {
217
            $resdate = dt_from_string();
218
        }
219
        if ( $expdate ){
220
            $expdate = dt_from_string( $expdate )->set({ hour => 23, minute => 59, second => 59 });
221
        }
222
    }
204
223
205
    # if we have an item selectionned, and the pickup branch is the same as the holdingbranch
224
    # if we have an item selectionned, and the pickup branch is the same as the holdingbranch
206
    # of the document, we force the value $priority and $found .
225
    # of the document, we force the value $priority and $found .
Lines 570-580 sub CanItemBeReserved { Link Here
570
        }
589
        }
571
    }
590
    }
572
591
592
    my $dtf = Koha::Database->new->schema->storage->datetime_parser;
593
    my $fromdate = dt_from_string->set({ hour => 00, minute => 00, second => 00 });
594
    my $todate = dt_from_string->set({ hour => 23, minute => 59, second => 59 });
595
573
    if (!$params->{ignore_hold_counts} && defined $holds_per_day && $holds_per_day ne '')
596
    if (!$params->{ignore_hold_counts} && defined $holds_per_day && $holds_per_day ne '')
574
    {
597
    {
575
        my $today_holds = Koha::Holds->search({
598
        my $today_holds = Koha::Holds->search({
576
            borrowernumber => $patron->borrowernumber,
599
            borrowernumber => $patron->borrowernumber,
577
            reservedate    => dt_from_string->date
600
            reservedate    => [ -and => { '>=' => $dtf->format_datetime($fromdate) }, { '<=' => $dtf->format_datetime($todate) } ],
578
        });
601
        });
579
        return _cache { status => 'tooManyReservesToday', limit => $holds_per_day } if $today_holds->count() >= $holds_per_day;
602
        return _cache { status => 'tooManyReservesToday', limit => $holds_per_day } if $today_holds->count() >= $holds_per_day;
580
    }
603
    }
Lines 1019-1025 sub CancelExpiredReserves { Link Here
1019
    my $dtf = Koha::Database->new->schema->storage->datetime_parser;
1042
    my $dtf = Koha::Database->new->schema->storage->datetime_parser;
1020
    my $params = {
1043
    my $params = {
1021
        -or => [
1044
        -or => [
1022
            { expirationdate => { '<', $dtf->format_date($today) } },
1045
            { expirationdate => { '<', $dtf->format_datetime($today) } },
1023
            { patron_expiration_date => { '<' => $dtf->format_date($today) } }
1046
            { patron_expiration_date => { '<' => $dtf->format_date($today) } }
1024
        ]
1047
        ]
1025
    };
1048
    };
Lines 2271-2277 sub CalculatePriority { Link Here
2271
        $sql.= ' AND ( reservedate <= ? )';
2294
        $sql.= ' AND ( reservedate <= ? )';
2272
    }
2295
    }
2273
    else {
2296
    else {
2274
        $sql.= ' AND ( reservedate < NOW() )';
2297
        $sql.= ' AND ( reservedate <= NOW() )';
2275
    }
2298
    }
2276
    my $dbh = C4::Context->dbh();
2299
    my $dbh = C4::Context->dbh();
2277
    my @row = $dbh->selectrow_array(
2300
    my @row = $dbh->selectrow_array(
(-)a/Koha/Item.pm (-1 / +1 lines)
Lines 1055-1061 sub current_holds { Link Here
1055
        itemnumber => $self->itemnumber,
1055
        itemnumber => $self->itemnumber,
1056
        suspend => 0,
1056
        suspend => 0,
1057
        -or => [
1057
        -or => [
1058
            reservedate => { '<=' => $dtf->format_date(dt_from_string) },
1058
            reservedate => { '<=' => $dtf->format_datetime(dt_from_string) },
1059
            waitingdate => { '!=' => undef },
1059
            waitingdate => { '!=' => undef },
1060
        ],
1060
        ],
1061
    };
1061
    };
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc (-3 / +7 lines)
Lines 121-134 Link Here
121
                <td>[% hold.notes | html | html_line_break %]</td>
121
                <td>[% hold.notes | html | html_line_break %]</td>
122
                <td data-order="[% hold.date| html %]">
122
                <td data-order="[% hold.date| html %]">
123
                    [% IF Koha.Preference('AllowHoldDateInFuture') %]
123
                    [% IF Koha.Preference('AllowHoldDateInFuture') %]
124
                        <input type="text" class="flatpickr" value="[% hold.date | html %]" required="required" size="10" name="reservedate" />
124
                        <input type="text" class="flatpickr" value="[% hold.date | html %]" required="required" size="15" name="reservedate" />
125
                    [% ELSE %]
125
                    [% ELSE %]
126
                        [% hold.date | $KohaDates %]
126
                        [% IF Koha.Preference('HourBasedHolds') %]
127
                            [% hold.date | $KohaDates with_hours = 1 %]
128
                        [% ELSE %]
129
                            [% hold.date | $KohaDates %]
130
                        [% END %]
127
                    [% END %]
131
                    [% END %]
128
                </td>
132
                </td>
129
                <td>
133
                <td>
130
                    [% UNLESS hold.expired %]
134
                    [% UNLESS hold.expired %]
131
                        <input type="text" class="flatpickr" data-flatpickr-futuredate="true" value="[% hold.expirationdate | html %]" size="10" name="expirationdate" />
135
                        <input type="text" class="flatpickr" data-flatpickr-futuredate="true" value="[% hold.expirationdate | html %]" size="15" name="expirationdate" />
132
                    [% ELSE %]
136
                    [% ELSE %]
133
                        <span class="expiredon"><label>Expired:</label> [% hold.expirationdate | $KohaDates %]</span>
137
                        <span class="expiredon"><label>Expired:</label> [% hold.expirationdate | $KohaDates %]</span>
134
                        <input type="hidden" value="[% hold.expirationdate | html %]"  name="expirationdate" />
138
                        <input type="hidden" value="[% hold.expirationdate | html %]"  name="expirationdate" />
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/waiting_holds.inc (-1 / +5 lines)
Lines 27-33 Link Here
27
            <tr>
27
            <tr>
28
                <th><input type="checkbox" class="select_hold" data-id="[% reserveloo.reserve_id | html %]"/></th>
28
                <th><input type="checkbox" class="select_hold" data-id="[% reserveloo.reserve_id | html %]"/></th>
29
                <td data-order="[% reserveloo.waitingdate | html %]"><span>[% reserveloo.waitingdate | $KohaDates %]</span></td>
29
                <td data-order="[% reserveloo.waitingdate | html %]"><span>[% reserveloo.waitingdate | $KohaDates %]</span></td>
30
                <td data-order="[% reserveloo.reservedate | html %]"><span>[% reserveloo.reservedate | $KohaDates %]</span></td>
30
                [% IF Koha.Preference('HourBasedHolds') %]
31
                    <td data-order="[% reserveloo.reservedate | html %]"><span>[% reserveloo.reservedate | $KohaDates with_hours = 1 %]</span></td>
32
                [% ELSE %]
33
                    <td data-order="[% reserveloo.reservedate | html %]"><span>[% reserveloo.reservedate | $KohaDates %]</span></td>
34
                [% END %]
31
              [% IF table_name == 'holdscr' %]
35
              [% IF table_name == 'holdscr' %]
32
                [% IF reserveloo.cancellation_requests.count %]
36
                [% IF reserveloo.cancellation_requests.count %]
33
                  [% FOREACH cancellation_request IN reserveloo.cancellation_requests %]
37
                  [% FOREACH cancellation_request IN reserveloo.cancellation_requests %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt (-1 / +5 lines)
Lines 198-204 Link Here
198
            </ul>
198
            </ul>
199
        </td>
199
        </td>
200
        <td data-order="[% hold.reservedate | html %]">
200
        <td data-order="[% hold.reservedate | html %]">
201
            [% hold.reservedate | $KohaDates %] in [% Branches.GetName ( hold.branchcode ) | html %]
201
            [% IF Koha.Preference('HourBasedHolds') %]
202
                [% hold.reservedate | $KohaDates with_hours = 1 %] in [% Branches.GetName ( hold.branchcode ) | html %]
203
            [% ELSE %]
204
                [% hold.reservedate | $KohaDates %] in [% Branches.GetName ( hold.branchcode ) | html %]
205
            [% END %]
202
        </td>
206
        </td>
203
        <td>[% hold.reservenotes | html %]</td>
207
        <td>[% hold.reservenotes | html %]</td>
204
        <td>
208
        <td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt (-1 / +7 lines)
Lines 208-214 Link Here
208
                        </td>
208
                        </td>
209
                        <td class="hq-patroncategory">[% itemsloo.patron.category.description | html %] ([% itemsloo.patron.categorycode | html %])</td>
209
                        <td class="hq-patroncategory">[% itemsloo.patron.category.description | html %] ([% itemsloo.patron.categorycode | html %])</td>
210
                        <td class="hq-sendto">[% Branches.GetName( itemsloo.pickbranch ) | html %]</td>
210
                        <td class="hq-sendto">[% Branches.GetName( itemsloo.pickbranch ) | html %]</td>
211
                        <td class="hq-date" data-order="[% itemsloo.reservedate | html %]">[% itemsloo.reservedate | $KohaDates %]</td>
211
                        <td class="hq-date" data-order="[% itemsloo.reservedate | html %]">
212
                            [% IF Koha.Preference('HourBasedHolds') %]
213
                                [% itemsloo.reservedate | $KohaDates with_hours = 1 %]
214
                            [% ELSE %]
215
                                [% itemsloo.reservedate | $KohaDates %]
216
                            [% END %]
217
                        </td>
212
                        <td class="hq-notes">[% itemsloo.notes | html %]</td>
218
                        <td class="hq-notes">[% itemsloo.notes | html %]</td>
213
                    </tr>
219
                    </tr>
214
                [% END %]
220
                [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt (-4 / +7 lines)
Lines 80-89 Link Here
80
          <td>[% hold.biblio.author | html %]</td>
80
          <td>[% hold.biblio.author | html %]</td>
81
          <td>[% hold.item.barcode | html %]</td>
81
          <td>[% hold.item.barcode | html %]</td>
82
          <td>[% Branches.GetName( hold.branchcode ) | html %]</td>
82
          <td>[% Branches.GetName( hold.branchcode ) | html %]</td>
83
          <td data-order="[% hold.reservedate | html %]">[% hold.reservedate | $KohaDates %]</td>
83
          [% IF Koha.Preference('HourBasedHolds') %]
84
          <td data-order="[% hold.expirationdate | html %]">
84
              <td data-order="[% hold.reservedate | html %]">[% hold.reservedate | $KohaDates with_hours = 1 %]</td>
85
                [% hold.expirationdate | $KohaDates %]
85
              <td data-order="[% hold.expirationdate | html %]">[% hold.expirationdate | $KohaDates with_hours = 1 %]</td>
86
          </td>
86
          [% ELSE %]
87
              <td data-order="[% hold.reservedate | html %]">[% hold.reservedate | $KohaDates %]</td>
88
              <td data-order="[% hold.expirationdate | html %]">[% hold.expirationdate | $KohaDates %]</td>
89
          [% END %]
87
          <td data-order="[% hold.waitingdate | html %]">
90
          <td data-order="[% hold.waitingdate | html %]">
88
                [% hold.waitingdate | $KohaDates %]
91
                [% hold.waitingdate | $KohaDates %]
89
          </td>
92
          </td>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt (-2 / +23 lines)
Lines 579-591 Link Here
579
                            [% IF ( Koha.Preference('AllowHoldDateInFuture') ) %]
579
                            [% IF ( Koha.Preference('AllowHoldDateInFuture') ) %]
580
                                <li>
580
                                <li>
581
                                    <label for="from">Hold starts on date:</label>
581
                                    <label for="from">Hold starts on date:</label>
582
                                    <input id="reserve_date" name="reserve_date" id="from" size="10" type="text" data-date_to="expiration_date" class="flatpickr" data-flatpickr-futuredate="true" />
582
                                    <input id="reserve_date" name="reserve_date" id="from" size="15" type="text" data-date_to="expiration_date" class="flatpickr" data-flatpickr-futuredate="true" />
583
                                </li>
583
                                </li>
584
                            [% END %]
584
                            [% END %]
585
585
586
                            <li>
586
                            <li>
587
                                <label for="to">Hold expires on date:</label>
587
                                <label for="to">Hold expires on date:</label>
588
                                <input id="expiration_date" name="expiration_date" id="to" size="10" type="text" class="flatpickr" data-flatpickr-futuredate="true" />
588
                                <input id="expiration_date" name="expiration_date" id="to" size="15" type="text" class="flatpickr" data-flatpickr-futuredate="true" />
589
                            </li>
589
                            </li>
590
590
591
                            [% UNLESS ( multi_hold ) %]
591
                            [% UNLESS ( multi_hold ) %]
Lines 1384-1389 Link Here
1384
                });
1384
                });
1385
            [% END %]
1385
            [% END %]
1386
1386
1387
            var startPicker = $("#reserve_date").flatpickr({
1388
                [% IF Koha.Preference('HourBasedHolds') %]
1389
                    enableTime: true,
1390
                    dateFormat: flatpickr_dateformat_string + " " + flatpickr_timeformat_string,
1391
                [% END %]
1392
            });
1393
1394
            var endPicker = $("#expiration_date").flatpickr({
1395
                [% IF Koha.Preference('HourBasedHolds') %]
1396
                    enableTime: true,
1397
                    dateFormat: flatpickr_dateformat_string + " " + flatpickr_timeformat_string,
1398
                [% END %]
1399
            });
1400
1401
            [% IF Koha.Preference('HourBasedHolds') %]
1402
                $(".holdst_reservedate, .futuredate").flatpickr({
1403
                    enableTime: true,
1404
                    dateFormat: flatpickr_dateformat_string + " " + flatpickr_timeformat_string,
1405
                });
1406
            [% END %]
1407
1387
            var my_table = $("#requestspecific").dataTable($.extend(true, {}, dataTablesDefaults, {
1408
            var my_table = $("#requestspecific").dataTable($.extend(true, {}, dataTablesDefaults, {
1388
                "paginate": false,
1409
                "paginate": false,
1389
                "dom": '<"top pager"ilf>t',
1410
                "dom": '<"top pager"ilf>t',
(-)a/svc/holds (-5 / +16 lines)
Lines 115-130 while ( my $h = $holds_rs->next() ) { Link Here
115
        priority              => $h->priority(),
115
        priority              => $h->priority(),
116
        reservenotes          => $h->reservenotes(),
116
        reservenotes          => $h->reservenotes(),
117
        itemtype_limit        => $itemtype_limit,
117
        itemtype_limit        => $itemtype_limit,
118
        reservedate_formatted => $h->reservedate()
119
        ? output_pref( { dt => dt_from_string( $h->reservedate() ), dateonly => 1 } )
120
        : q{},
121
        suspend_until_formatted => $h->suspend_until()
118
        suspend_until_formatted => $h->suspend_until()
122
        ? output_pref( { dt => dt_from_string( $h->suspend_until() ), dateonly => 1 } )
119
        ? output_pref( { dt => dt_from_string( $h->suspend_until() ), dateonly => 1 } )
123
        : q{},
120
        : q{},
124
        expirationdate_formatted => $h->expirationdate()
121
    };
122
123
    if ( C4::Context->preference('HourBasedHolds') ){
124
        $hold->{reservedate_formatted} => $h->reservedate()
125
        ? output_pref( { dt => dt_from_string( $h->reservedate() ) } )
126
        : q{},
127
        $hold->{expirationdate_formatted} => $h->expirationdate()
128
        ? output_pref( { dt => dt_from_string( $h->expirationdate() ) } )
129
        : q{},
130
    } else {
131
        $hold->{reservedate_formatted} => $h->reservedate()
132
        ? output_pref( { dt => dt_from_string( $h->reservedate() ), dateonly => 1 } )
133
        : q{},
134
        $hold->{expirationdate_formatted} => $h->expirationdate()
125
        ? output_pref( { dt => dt_from_string( $h->expirationdate() ), dateonly => 1 } )
135
        ? output_pref( { dt => dt_from_string( $h->expirationdate() ), dateonly => 1 } )
126
        : q{},
136
        : q{},
127
    };
137
    }
138
128
139
129
    $hold->{transfered}     = 0;
140
    $hold->{transfered}     = 0;
130
    $hold->{not_transfered} = 0;
141
    $hold->{not_transfered} = 0;
(-)a/t/db_dependent/Holds.t (-5 / +71 lines)
Lines 7-13 use t::lib::TestBuilder; Link Here
7
7
8
use C4::Context;
8
use C4::Context;
9
9
10
use Test::More tests => 74;
10
use Test::More tests => 75;
11
use Test::Exception;
11
use Test::Exception;
12
12
13
use MARC::Record;
13
use MARC::Record;
Lines 108-114 my $reservedate = $first_hold->reservedate; Link Here
108
my $borrowernumber = $first_hold->borrowernumber;
108
my $borrowernumber = $first_hold->borrowernumber;
109
my $branch_1code = $first_hold->branchcode;
109
my $branch_1code = $first_hold->branchcode;
110
my $reserve_id = $first_hold->reserve_id;
110
my $reserve_id = $first_hold->reserve_id;
111
is( $reservedate, output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }), "holds_placed_today should return a valid reserve date");
111
is( dt_from_string($reservedate), dt_from_string, "holds_placed_today should return a valid reserve date");
112
is( $borrowernumber, $borrowernumbers[0], "holds_placed_today should return a valid borrowernumber");
112
is( $borrowernumber, $borrowernumbers[0], "holds_placed_today should return a valid borrowernumber");
113
is( $branch_1code, $branch_1, "holds_placed_today should return a valid branchcode");
113
is( $branch_1code, $branch_1, "holds_placed_today should return a valid branchcode");
114
ok($reserve_id, "Test holds_placed_today()");
114
ok($reserve_id, "Test holds_placed_today()");
Lines 939-945 subtest 'CanItemBeReserved / holds_per_day tests' => sub { Link Here
939
    is_deeply(
939
    is_deeply(
940
        CanItemBeReserved( $patron, $item_2 ),
940
        CanItemBeReserved( $patron, $item_2 ),
941
        { status => 'tooManyReservesToday', limit => 2 },
941
        { status => 'tooManyReservesToday', limit => 2 },
942
        'Patron cannot a third item with 2 reserves daily cap'
942
        'Patron cannot reserve a third item with 2 reserves daily cap'
943
    );
943
    );
944
944
945
    # Update last hold so reservedate is in the past, so 2 holds, but different day
945
    # Update last hold so reservedate is in the past, so 2 holds, but different day
Lines 1702-1708 subtest 'ModReserve can only update expirationdate for found holds' => sub { Link Here
1702
1702
1703
    $hold = Koha::Holds->find($reserve_id);
1703
    $hold = Koha::Holds->find($reserve_id);
1704
1704
1705
    is( $hold->expirationdate, '1981-06-10',
1705
    is( dt_from_string( $hold->expirationdate )->ymd, '1981-06-10',
1706
        'Found hold expiration date updated correctly' );
1706
        'Found hold expiration date updated correctly' );
1707
    is( $hold->priority, '0', 'Found hold priority was not updated' );
1707
    is( $hold->priority, '0', 'Found hold priority was not updated' );
1708
1708
Lines 1887-1889 subtest 'EmailPatronWhenHoldIsPlaced tests' => sub { Link Here
1887
1887
1888
    $schema->storage->txn_rollback;
1888
    $schema->storage->txn_rollback;
1889
};
1889
};
1890
- 
1890
1891
subtest 'HourBasedHolds' => sub {
1892
    plan tests => 4;
1893
    $schema->storage->txn_begin;
1894
1895
    my $category = $builder->build({ source => 'Category' });
1896
    my $branch = $builder->build({ source => 'Branch' })->{ branchcode };
1897
    my $biblio = $builder->build_sample_biblio( { itemtype => 'DUMMY' } );
1898
    my $itemnumber = $builder->build_sample_item(
1899
        { library => $branch, biblionumber => $biblio->biblionumber } )
1900
      ->itemnumber;
1901
1902
    my $borrowernumber = Koha::Patron->new(
1903
        {
1904
            firstname    => 'firstname',
1905
            surname      => 'surname',
1906
            categorycode => $category->{categorycode},
1907
            branchcode   => $branch,
1908
        }
1909
    )->store->borrowernumber;
1910
1911
    t::lib::Mocks::mock_preference('HourBasedHolds', 1);
1912
1913
    my $reservation_date = DateTime->now->set( hour => 7, minute => 30 );
1914
    my $expiration_date = DateTime->now->set( hour => 19, minute => 30 );
1915
1916
    my $reserve_id = AddReserve(
1917
        {
1918
            branchcode     => $branch,
1919
            borrowernumber => $borrowernumber,
1920
            biblionumber   => $biblio->biblionumber,
1921
            priority       =>
1922
              C4::Reserves::CalculatePriority( $biblio->biblionumber ),
1923
            itemnumber => $itemnumber,
1924
            reservation_date => $reservation_date,
1925
            expiration_date => $expiration_date,
1926
        }
1927
    );
1928
1929
    my $hold = Koha::Holds->find($reserve_id);
1930
    is( dt_from_string( $hold->reservedate )->hour, 07, "Hold reserve date is set correctly with hours when HourBasedHolds enabled" );
1931
    is( dt_from_string( $hold->expirationdate )->hour, 19, "Hold expiration date is set correctly with hours when HourBasedHolds enabled" );
1932
1933
    t::lib::Mocks::mock_preference('HourBasedHolds', 0);
1934
1935
    $reservation_date = DateTime->now->ymd;
1936
    $expiration_date = DateTime->now->ymd;
1937
1938
    $reserve_id = AddReserve(
1939
        {
1940
            branchcode     => $branch,
1941
            borrowernumber => $borrowernumber,
1942
            biblionumber   => $biblio->biblionumber,
1943
            priority       =>
1944
              C4::Reserves::CalculatePriority( $biblio->biblionumber ),
1945
            itemnumber => $itemnumber,
1946
            reservation_date => $reservation_date,
1947
            expiration_date => $expiration_date,
1948
        }
1949
    );
1950
1951
    $hold = Koha::Holds->find($reserve_id);
1952
    is( dt_from_string( $hold->reservedate )->hour, 00, "Hold reserve date is set correctly when HourBasedHolds disabled" );
1953
    is( dt_from_string( $hold->expirationdate )->hour, 23, "Hold expiration date is set correctly when HourBasedHolds disabled" );
1954
1955
    $schema->storage->txn_rollback;
1956
};

Return to bug 24718