Bugzilla – Attachment 190894 Details for
Bug 41456
Item type filter on the hold history view does not work correctly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41456: Rename more item_type => item_type_id in hold's api spec
b475de2.patch (text/plain), 3.43 KB, created by
Jonathan Druart
on 2026-01-05 15:36:17 UTC
(
hide
)
Description:
Bug 41456: Rename more item_type => item_type_id in hold's api spec
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2026-01-05 15:36:17 UTC
Size:
3.43 KB
patch
obsolete
>From b475de2a42e26856c7b16e1ef81a726316803bd3 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 5 Jan 2026 16:32:52 +0100 >Subject: [PATCH] Bug 41456: Rename more item_type => item_type_id in hold's > api spec > >--- > Koha/REST/V1/Holds.pm | 4 ++-- > api/v1/swagger/paths/holds.yaml | 2 +- > t/db_dependent/api/v1/holds.t | 6 +++--- > 3 files changed, 6 insertions(+), 6 deletions(-) > >diff --git a/Koha/REST/V1/Holds.pm b/Koha/REST/V1/Holds.pm >index 4fdb604a707..c8892392189 100644 >--- a/Koha/REST/V1/Holds.pm >+++ b/Koha/REST/V1/Holds.pm >@@ -81,7 +81,7 @@ sub add { > my $pickup_library_id = $body->{pickup_library_id}; > my $item_id = $body->{item_id}; > my $patron_id = $body->{patron_id}; >- my $item_type = $body->{item_type}; >+ my $item_type_id = $body->{item_type_id}; > my $expiration_date = $body->{expiration_date}; > my $notes = $body->{notes}; > my $hold_date = $body->{hold_date}; >@@ -209,7 +209,7 @@ sub add { > title => $biblio->title, > itemnumber => $item_id, > found => undef, # TODO: Why not? >- itemtype => $item_type, >+ itemtype => $item_type_id, > non_priority => $non_priority, > item_group_id => $item_group_id, > confirmations => $confirmations, >diff --git a/api/v1/swagger/paths/holds.yaml b/api/v1/swagger/paths/holds.yaml >index dde7041a0eb..dcd6413c03a 100644 >--- a/api/v1/swagger/paths/holds.yaml >+++ b/api/v1/swagger/paths/holds.yaml >@@ -201,7 +201,7 @@ > type: > - string > - "null" >- item_type: >+ item_type_id: > description: Limit hold on one itemtype (ignored for item-level holds) > type: > - string >diff --git a/t/db_dependent/api/v1/holds.t b/t/db_dependent/api/v1/holds.t >index a96ca9fe65b..e0f2183f53d 100755 >--- a/t/db_dependent/api/v1/holds.t >+++ b/t/db_dependent/api/v1/holds.t >@@ -277,7 +277,7 @@ subtest 'Reserves with itemtype' => sub { > patron_id => int( $patron_1->borrowernumber ), > biblio_id => int( $biblio_1->biblionumber ), > pickup_library_id => $branchcode, >- item_type => $itemtype, >+ item_type_id => $itemtype, > }; > > $t->delete_ok("//$userid_3:$password@/api/v1/holds/$reserve_id")->status_is( 204, 'REST3.2.4' ) >@@ -294,7 +294,7 @@ subtest 'Reserves with itemtype' => sub { > $reserve_id = $t->tx->res->json->{hold_id}; > > $t->get_ok( "//$userid_1:$password@/api/v1/holds?patron_id=" . $patron_1->borrowernumber )->status_is(200) >- ->json_is( '/0/hold_id', $reserve_id )->json_is( '/0/item_type', $itemtype ); >+ ->json_is( '/0/hold_id', $reserve_id )->json_is( '/0/item_type_id', $itemtype ); > }; > > subtest 'test AllowHoldDateInFuture' => sub { >@@ -769,7 +769,7 @@ subtest 'add() tests (maxreserves behaviour)' => sub { > patron_id => $patron->borrowernumber, > biblio_id => $biblio_1->biblionumber, > pickup_library_id => $item_1->home_branch->branchcode, >- item_type => $item_1->itype, >+ item_type_id => $item_1->itype, > }; > > $t->post_ok( "//$userid:$password@/api/v1/holds" => json => $post_data )->status_is(201); >-- >2.43.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41456
:
190537
|
190553
|
190702
|
190894
|
190919
|
191418