Bugzilla – Attachment 190924 Details for
Bug 41530
item_type vs item_type_id inconsistencies in the API
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41530: Rename item_type => item_type_id in clubs holds API spec
385fb28.patch (text/plain), 2.50 KB, created by
Martin Renvoize (ashimema)
on 2026-01-06 10:47:56 UTC
(
hide
)
Description:
Bug 41530: Rename item_type => item_type_id in clubs holds API spec
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2026-01-06 10:47:56 UTC
Size:
2.50 KB
patch
obsolete
>From 385fb28fb3a2d44532f30f1860d47ecc2cb22afc Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@openfifth.co.uk> >Date: Tue, 6 Jan 2026 10:43:54 +0000 >Subject: [PATCH] Bug 41530: Rename item_type => item_type_id in clubs holds > API spec > >Following the API consistency work in bug 41456, this patch renames >the item_type field to item_type_id in the clubs holds API endpoint. > >The field should only be named item_type when it contains an embedded >object (type: object/null). When it contains a foreign key ID >(type: string/null), it should be named item_type_id for consistency. > >Changes: >- Updated api/v1/swagger/paths/clubs.yaml >- Updated Koha::REST::V1::Clubs::Holds to use item_type_id > >Test plan: >1. Run API tests: prove t/db_dependent/api/v1/clubs_holds.t >2. Verify club holds continue to work correctly >3. Check that item_type_id field is properly mapped in API requests >--- > Koha/REST/V1/Clubs/Holds.pm | 4 ++-- > api/v1/swagger/paths/clubs.yaml | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/Koha/REST/V1/Clubs/Holds.pm b/Koha/REST/V1/Clubs/Holds.pm >index 64696702b09..db3ce39a24a 100644 >--- a/Koha/REST/V1/Clubs/Holds.pm >+++ b/Koha/REST/V1/Clubs/Holds.pm >@@ -52,7 +52,7 @@ sub add { > my $biblio_id = $body->{biblio_id}; > my $pickup_library_id = $body->{pickup_library_id}; > my $item_id = $body->{item_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 $default_patron_home = $body->{default_patron_home}; >@@ -96,7 +96,7 @@ sub add { > pickup_library_id => $pickup_library_id, > expiration_date => $expiration_date, > notes => $notes, >- item_type => $item_type, >+ item_type => $item_type_id, > default_patron_home => $default_patron_home > } > ); >diff --git a/api/v1/swagger/paths/clubs.yaml b/api/v1/swagger/paths/clubs.yaml >index c040e531f2d..9a6714a4f3c 100644 >--- a/api/v1/swagger/paths/clubs.yaml >+++ b/api/v1/swagger/paths/clubs.yaml >@@ -39,7 +39,7 @@ > type: > - string > - "null" >- item_type: >+ item_type_id: > description: Limit hold on one itemtype (ignored for item-level holds) > type: > - string >-- >2.52.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 41530
:
190922
|
190923
| 190924