Bugzilla – Attachment 163438 Details for
Bug 36120
Add pickup locations to bookings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36120: Add pickup_library support to bookings API
Bug-36120-Add-pickuplibrary-support-to-bookings-AP.patch (text/plain), 3.46 KB, created by
Martin Renvoize (ashimema)
on 2024-03-19 14:23:49 UTC
(
hide
)
Description:
Bug 36120: Add pickup_library support to bookings API
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-03-19 14:23:49 UTC
Size:
3.46 KB
patch
obsolete
>From 89947649eda630a1db58597410d661de696aa8c0 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 7 Mar 2024 17:12:51 +0000 >Subject: [PATCH] Bug 36120: Add pickup_library support to bookings API > >Signed-off-by: Lisette Scheer <lisette.scheer@bywatersolutions.com> >Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org> >--- > Koha/Booking.pm | 13 +++++++++++++ > api/v1/swagger/definitions/booking.yaml | 9 +++++++++ > api/v1/swagger/paths/biblios.yaml | 6 ++++-- > api/v1/swagger/paths/bookings.yaml | 3 ++- > 4 files changed, 28 insertions(+), 3 deletions(-) > >diff --git a/Koha/Booking.pm b/Koha/Booking.pm >index 65d3122b6ee..f1004ae1f73 100644 >--- a/Koha/Booking.pm >+++ b/Koha/Booking.pm >@@ -58,6 +58,19 @@ sub patron { > return Koha::Patron->_new_from_dbic($patron_rs); > } > >+=head3 pickup_library >+ >+Returns the related Koha::Library object for this booking >+ >+=cut >+ >+sub pickup_library { >+ my ($self) = @_; >+ >+ my $pickup_library_rs = $self->_result->pickup_library; >+ return Koha::Library->_new_from_dbic($pickup_library_rs); >+} >+ > =head3 item > > Returns the related Koha::Item object for this Booking >diff --git a/api/v1/swagger/definitions/booking.yaml b/api/v1/swagger/definitions/booking.yaml >index 23393a60ff3..aed1e31b3f9 100644 >--- a/api/v1/swagger/definitions/booking.yaml >+++ b/api/v1/swagger/definitions/booking.yaml >@@ -32,6 +32,14 @@ properties: > type: > - object > - "null" >+ pickup_library_id: >+ description: Internal pickup_library identifier >+ type: string >+ pickup_library: >+ description: Embedable pickup_library representation >+ type: >+ - object >+ - "null" > start_date: > description: Start date and time of this booking > format: date-time >@@ -40,6 +48,7 @@ required: > - biblio_id > - item_id > - patron_id >+ - pickup_library_id > - start_date > - end_date > type: object >diff --git a/api/v1/swagger/paths/biblios.yaml b/api/v1/swagger/paths/biblios.yaml >index 30702535577..25e73cd8cde 100644 >--- a/api/v1/swagger/paths/biblios.yaml >+++ b/api/v1/swagger/paths/biblios.yaml >@@ -299,6 +299,7 @@ > enum: > - item > - patron >+ - pickup_library > collectionFormat: csv > consumes: > - application/json >@@ -372,7 +373,8 @@ > collectionFormat: csv > - name: checked_in > in: query >- description: By default, current checkouts are returned, when this is true then >+ description: >+ By default, current checkouts are returned, when this is true then > checked in checkouts are returned as result. > type: boolean > produces: >@@ -787,7 +789,7 @@ > - integer > - "null" > required: >- - rating >+ - rating > additionalProperties: false > produces: > - application/json >diff --git a/api/v1/swagger/paths/bookings.yaml b/api/v1/swagger/paths/bookings.yaml >index f7bb0b88045..35a50a34108 100644 >--- a/api/v1/swagger/paths/bookings.yaml >+++ b/api/v1/swagger/paths/bookings.yaml >@@ -46,6 +46,7 @@ > - biblio > - item > - patron >+ - pickup_library > collectionFormat: csv > produces: > - application/json >@@ -121,7 +122,7 @@ > permissions: > circulate: manage_bookings > x-mojo-to: Bookings#add >-'/bookings/{booking_id}': >+"/bookings/{booking_id}": > delete: > operationId: deleteBooking > parameters: >-- >2.44.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 36120
:
162911
|
162912
|
162914
|
162915
|
162916
|
162917
|
162918
|
162919
|
162920
|
162921
|
162922
|
162923
|
162924
|
162925
|
162926
|
162927
|
162928
|
162976
|
163218
|
163219
|
163220
|
163221
|
163222
|
163223
|
163224
|
163435
|
163436
|
163437
|
163438
|
163439
|
163440
|
163441
|
163442
|
163443
|
163444
|
163445
|
163446
|
163447
|
163448
|
163565
|
163566
|
163567
|
163568
|
163569
|
163570
|
163571
|
163603
|
163604
|
163605
|
163606
|
163607
|
163608
|
163609
|
163610
|
163611
|
163612
|
163613
|
163635
|
163636
|
165140
|
165175
|
165176
|
165177
|
165178
|
165179
|
165180
|
165181
|
165182
|
165183
|
165184
|
165185
|
165186
|
165187
|
165188
|
165214
|
165215
|
165216
|
165419
|
165420
|
165421
|
165422
|
165423
|
165424
|
165425
|
165426
|
165427
|
165428
|
165429
|
165430
|
165431
|
165432
|
165433
|
165434
|
165435
|
165984
|
165985
|
165986
|
165987
|
165988
|
165989
|
165990
|
165991
|
165992
|
165993
|
165994
|
165995
|
165996
|
165997
|
165998
|
165999
|
166000
|
166001
|
166002