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

(-)a/Koha/REST/V1/Holds.pm (-2 / +2 lines)
Lines 282-289 sub edit { Link Here
282
        # suspended_until can also be set to undef
282
        # suspended_until can also be set to undef
283
        my $suspended_until =
283
        my $suspended_until =
284
          exists $body->{suspended_until}
284
          exists $body->{suspended_until}
285
          ? dt_from_string( $body->{suspended_until}, 'rfc3339' )
285
          ? $body->{suspended_until} && dt_from_string( $body->{suspended_until}, 'rfc3339' )
286
          : dt_from_string( $hold->suspend_until,     'iso' );
286
          : $hold->suspend_until     && dt_from_string( $hold->suspend_until,     'iso' );
287
287
288
        my $params = {
288
        my $params = {
289
            reserve_id    => $hold_id,
289
            reserve_id    => $hold_id,
(-)a/t/db_dependent/api/v1/holds.t (-2 / +8 lines)
Lines 892-898 subtest 'pickup_locations() tests' => sub { Link Here
892
892
893
subtest 'edit() tests' => sub {
893
subtest 'edit() tests' => sub {
894
894
895
    plan tests => 37;
895
    plan tests => 39;
896
896
897
    $schema->storage->txn_begin;
897
    $schema->storage->txn_begin;
898
898
Lines 1010-1015 subtest 'edit() tests' => sub { Link Here
1010
                branchcode   => $library_3->branchcode,
1010
                branchcode   => $library_3->branchcode,
1011
                itemnumber   => $item->itemnumber,
1011
                itemnumber   => $item->itemnumber,
1012
                priority     => 1,
1012
                priority     => 1,
1013
                suspend       => 0,
1014
                suspend_until => undef,
1015
                waitingdate   => undef
1013
            }
1016
            }
1014
        }
1017
        }
1015
    );
1018
    );
Lines 1061-1067 subtest 'edit() tests' => sub { Link Here
1061
    $item_hold->discard_changes;
1064
    $item_hold->discard_changes;
1062
    is( $item_hold->branchcode, $library_2->id, 'Pickup location changed correctly' );
1065
    is( $item_hold->branchcode, $library_2->id, 'Pickup location changed correctly' );
1063
1066
1067
    is( $item_hold->suspend, 0, 'Location change shouldn\'t touch suspended status' );
1068
    is( $item_hold->suspend_until, undef, 'suspended_until should be undef' );
1069
1064
    $schema->storage->txn_rollback;
1070
    $schema->storage->txn_rollback;
1071
1065
};
1072
};
1066
1073
1067
subtest 'add() tests' => sub {
1074
subtest 'add() tests' => sub {
1068
- 

Return to bug 29906