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

(-)a/Koha/REST/V1/Holds.pm (-2 / +2 lines)
Lines 81-87 sub add { Link Here
81
        my $pickup_library_id = $body->{pickup_library_id};
81
        my $pickup_library_id = $body->{pickup_library_id};
82
        my $item_id           = $body->{item_id};
82
        my $item_id           = $body->{item_id};
83
        my $patron_id         = $body->{patron_id};
83
        my $patron_id         = $body->{patron_id};
84
        my $item_type         = $body->{item_type};
84
        my $item_type_id      = $body->{item_type_id};
85
        my $expiration_date   = $body->{expiration_date};
85
        my $expiration_date   = $body->{expiration_date};
86
        my $notes             = $body->{notes};
86
        my $notes             = $body->{notes};
87
        my $hold_date         = $body->{hold_date};
87
        my $hold_date         = $body->{hold_date};
Lines 209-215 sub add { Link Here
209
                title            => $biblio->title,
209
                title            => $biblio->title,
210
                itemnumber       => $item_id,
210
                itemnumber       => $item_id,
211
                found            => undef,                # TODO: Why not?
211
                found            => undef,                # TODO: Why not?
212
                itemtype         => $item_type,
212
                itemtype         => $item_type_id,
213
                non_priority     => $non_priority,
213
                non_priority     => $non_priority,
214
                item_group_id    => $item_group_id,
214
                item_group_id    => $item_group_id,
215
                confirmations    => $confirmations,
215
                confirmations    => $confirmations,
(-)a/api/v1/swagger/paths/holds.yaml (-1 / +1 lines)
Lines 201-207 Link Here
201
              type:
201
              type:
202
                - string
202
                - string
203
                - "null"
203
                - "null"
204
            item_type:
204
            item_type_id:
205
              description: Limit hold on one itemtype (ignored for item-level holds)
205
              description: Limit hold on one itemtype (ignored for item-level holds)
206
              type:
206
              type:
207
                - string
207
                - string
(-)a/t/db_dependent/api/v1/holds.t (-4 / +3 lines)
Lines 277-283 subtest 'Reserves with itemtype' => sub { Link Here
277
        patron_id         => int( $patron_1->borrowernumber ),
277
        patron_id         => int( $patron_1->borrowernumber ),
278
        biblio_id         => int( $biblio_1->biblionumber ),
278
        biblio_id         => int( $biblio_1->biblionumber ),
279
        pickup_library_id => $branchcode,
279
        pickup_library_id => $branchcode,
280
        item_type         => $itemtype,
280
        item_type_id      => $itemtype,
281
    };
281
    };
282
282
283
    $t->delete_ok("//$userid_3:$password@/api/v1/holds/$reserve_id")->status_is( 204, 'REST3.2.4' )
283
    $t->delete_ok("//$userid_3:$password@/api/v1/holds/$reserve_id")->status_is( 204, 'REST3.2.4' )
Lines 294-300 subtest 'Reserves with itemtype' => sub { Link Here
294
    $reserve_id = $t->tx->res->json->{hold_id};
294
    $reserve_id = $t->tx->res->json->{hold_id};
295
295
296
    $t->get_ok( "//$userid_1:$password@/api/v1/holds?patron_id=" . $patron_1->borrowernumber )->status_is(200)
296
    $t->get_ok( "//$userid_1:$password@/api/v1/holds?patron_id=" . $patron_1->borrowernumber )->status_is(200)
297
        ->json_is( '/0/hold_id', $reserve_id )->json_is( '/0/item_type', $itemtype );
297
        ->json_is( '/0/hold_id', $reserve_id )->json_is( '/0/item_type_id', $itemtype );
298
};
298
};
299
299
300
subtest 'test AllowHoldDateInFuture' => sub {
300
subtest 'test AllowHoldDateInFuture' => sub {
Lines 769-775 subtest 'add() tests (maxreserves behaviour)' => sub { Link Here
769
        patron_id         => $patron->borrowernumber,
769
        patron_id         => $patron->borrowernumber,
770
        biblio_id         => $biblio_1->biblionumber,
770
        biblio_id         => $biblio_1->biblionumber,
771
        pickup_library_id => $item_1->home_branch->branchcode,
771
        pickup_library_id => $item_1->home_branch->branchcode,
772
        item_type         => $item_1->itype,
772
        item_type_id      => $item_1->itype,
773
    };
773
    };
774
774
775
    $t->post_ok( "//$userid:$password@/api/v1/holds" => json => $post_data )->status_is(201);
775
    $t->post_ok( "//$userid:$password@/api/v1/holds" => json => $post_data )->status_is(201);
776
- 

Return to bug 41456