Bugzilla – Attachment 162916 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), 2.19 KB, created by
Martin Renvoize (ashimema)
on 2024-03-07 17:22:07 UTC
(
hide
)
Description:
Bug 36120: Add pickup_library support to bookings API
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-03-07 17:22:07 UTC
Size:
2.19 KB
patch
obsolete
>From e188af942da8290bd4e18a5a34d013bbca34828b 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 > >--- > Koha/Booking.pm | 13 +++++++++++++ > api/v1/swagger/definitions/booking.yaml | 8 ++++++++ > api/v1/swagger/paths/bookings.yaml | 3 ++- > 3 files changed, 23 insertions(+), 1 deletion(-) > >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 a615bb9ed83..582367ef553 100644 >--- a/api/v1/swagger/definitions/booking.yaml >+++ b/api/v1/swagger/definitions/booking.yaml >@@ -33,6 +33,14 @@ properties: > type: > - object > - "null" >+ pickup_library_id: >+ description: Internal pickup_library identifier >+ type: integer >+ pickup_library: >+ description: Embedable pickup_library representation >+ type: >+ - object >+ - "null" > start_date: > description: Start date and time of this booking > format: date-time >diff --git a/api/v1/swagger/paths/bookings.yaml b/api/v1/swagger/paths/bookings.yaml >index f1dcb9f9be9..fb23498c5c4 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 >@@ -117,7 +118,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