Bugzilla – Attachment 168122 Details for
Bug 35906
Add bookable option on itemtypes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35906: (QA follow-up) Fix item-type schema
Bug-35906-QA-follow-up-Fix-item-type-schema.patch (text/plain), 1.99 KB, created by
Thibaud Guillot (thibaud_g)
on 2024-06-26 08:11:50 UTC
(
hide
)
Description:
Bug 35906: (QA follow-up) Fix item-type schema
Filename:
MIME Type:
Creator:
Thibaud Guillot (thibaud_g)
Created:
2024-06-26 08:11:50 UTC
Size:
1.99 KB
patch
obsolete
>From 05d4e59938a29601bad7e86f5eb74dad7888b96d Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 26 Feb 2024 19:28:03 +0000 >Subject: [PATCH] Bug 35906: (QA follow-up) Fix item-type schema > >--- > Koha/Item.pm | 18 ------------------ > api/v1/swagger/definitions/item_type.yaml | 3 +++ > 2 files changed, 3 insertions(+), 18 deletions(-) > >diff --git a/Koha/Item.pm b/Koha/Item.pm >index 03e2d0794ad..b8189f425a3 100644 >--- a/Koha/Item.pm >+++ b/Koha/Item.pm >@@ -1812,24 +1812,6 @@ sub itemtype { > return Koha::ItemTypes->find( $self->effective_itemtype ); > } > >-=head3 item_type >- >- my $item_type = $item->item_type; >- >-Returns the effective I<Koha::ItemType> for the item. >- >-FIXME: it should either return the 'real item type' or undef if no item type >-defined. And effective_itemtype should return... the effective itemtype. Right >-now it returns an id... This is all inconsistent. And the API should make it clear >-if the attribute is part of the resource, or a calculated value i.e. if the item >-is not linked to an item type on its own, then the API response should contain >-item_type: null! And the effective item type... be another attribute. I understand >-that this complicates filtering, but some query trickery could do it in the controller. >- >-=cut >- >-sub item_type { >- return shift->itemtype; > =head3 effective_bookable > > my $bookable = $item->effective_bookable; >diff --git a/api/v1/swagger/definitions/item_type.yaml b/api/v1/swagger/definitions/item_type.yaml >index f451c2892ba..274c393b83d 100644 >--- a/api/v1/swagger/definitions/item_type.yaml >+++ b/api/v1/swagger/definitions/item_type.yaml >@@ -13,6 +13,9 @@ properties: > description: > description: A plain text explanation of the item type > type: string >+ bookable: >+ description: Boolean denoting whether this item type is normally bookable >+ type: boolean > rentalcharge: > description: The amount charged when this item is checked out/issued > type: >-- >2.30.2
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 35906
:
161397
|
161638
|
161744
|
161961
|
162242
|
162365
|
162465
|
162466
|
162467
|
162468
|
162469
|
162470
|
162472
|
163291
|
163292
|
163293
|
163294
|
163295
|
163547
|
163548
|
163549
|
163550
|
163551
|
164579
|
164580
|
164581
|
164582
|
164583
|
164584
|
164585
|
165437
|
166866
|
166867
|
166868
|
166869
|
166870
|
166871
|
168120
|
168121
|
168122
|
168160
|
168161
|
168162
|
168163
|
168164
|
170187
|
170188
|
170189
|
170190
|
170191
|
170582
|
170583
|
170584
|
170585
|
170586
|
172127
|
172128
|
172129
|
172130
|
172131
|
172132
|
172941
|
172945
|
172950
|
172951
|
172952
|
172953
|
172954
|
172955
|
172956
|
172957
|
172958
|
172959
|
172960
|
172961
|
173324
|
173325
|
173326
|
173327
|
173328
|
173329
|
173330
|
173331
|
173332
|
173333
|
173334
|
173335
|
173893