Bugzilla – Attachment 171378 Details for
Bug 37592
Add a record of creation and modification to bookings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37592: (QA follow-up) Add API mapping and definition
Bug-37592-QA-follow-up-Add-API-mapping-and-definit.patch (text/plain), 1.77 KB, created by
Martin Renvoize (ashimema)
on 2024-09-12 10:52:13 UTC
(
hide
)
Description:
Bug 37592: (QA follow-up) Add API mapping and definition
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-09-12 10:52:13 UTC
Size:
1.77 KB
patch
obsolete
>From 895e15a28257af4902f529d1bd97c4c83bc43910 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 12 Sep 2024 11:49:53 +0100 >Subject: [PATCH] Bug 37592: (QA follow-up) Add API mapping and definition > >Sticking to API guidelines, this adds the creation_date and >modification_date fields to the api definitions and the required >to_api_mappings for those fields to be properly populated. > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/Booking.pm | 5 ++++- > api/v1/swagger/definitions/booking.yaml | 8 ++++++++ > 2 files changed, 12 insertions(+), 1 deletion(-) > >diff --git a/Koha/Booking.pm b/Koha/Booking.pm >index e5297d8d17b..403ca3bf4eb 100644 >--- a/Koha/Booking.pm >+++ b/Koha/Booking.pm >@@ -241,7 +241,10 @@ on the API. > =cut > > sub to_api_mapping { >- return {}; >+ return { >+ created_on => "creation_date", >+ updated_on => "modification_date" >+ }; > } > > =head3 delete >diff --git a/api/v1/swagger/definitions/booking.yaml b/api/v1/swagger/definitions/booking.yaml >index 5a7b8cc77b2..d6db77263c1 100644 >--- a/api/v1/swagger/definitions/booking.yaml >+++ b/api/v1/swagger/definitions/booking.yaml >@@ -10,6 +10,10 @@ properties: > booking_id: > description: Internal booking identifier > type: integer >+ creation_date: >+ description: Creation date and time of this booking >+ format: date-time >+ type: string > end_date: > description: Start date and time of this booking > format: date-time >@@ -24,6 +28,10 @@ properties: > type: > - object > - 'null' >+ modification_date: >+ description: Modification date and time of this booking >+ format: date-time >+ type: string > patron_id: > description: Internal patron identifier > type: integer >-- >2.46.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 37592
:
170144
|
170161
|
170763
|
171254
|
171376
|
171377
| 171378 |
171524
|
171645