Bugzilla – Attachment 101537 Details for
Bug 24461
Add to_api_mapping to Koha::Acquisition::BasketGroup
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24461: Add to_api_mapping to Koha::Acquisition::BasketGroup
Bug-24461-Add-toapimapping-to-KohaAcquisitionBaske.patch (text/plain), 2.22 KB, created by
Jonathan Druart
on 2020-03-24 10:46:12 UTC
(
hide
)
Description:
Bug 24461: Add to_api_mapping to Koha::Acquisition::BasketGroup
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-03-24 10:46:12 UTC
Size:
2.22 KB
patch
obsolete
>From 189fc622a4ad9bb3f26ebf6155c7e18ee4452d3d Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 20 Jan 2020 11:08:23 -0300 >Subject: [PATCH] Bug 24461: Add to_api_mapping to > Koha::Acquisition::BasketGroup > >This patch adds to_api_mapping to the Koha::Acquistion::BasketGroup >class. > >To test: >1. Compare the mapping with the one on the RFC >=> SUCCESS: They match >2. Sigh off :-D > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Amended patch: remove extra lines between methods koha_object[s]_class. >That's how they are in other modules. >--- > Koha/Acquisition/BasketGroup.pm | 18 +++++++++++++++++- > Koha/Schema/Result/Aqbasketgroup.pm | 3 +++ > 2 files changed, 20 insertions(+), 1 deletion(-) > >diff --git a/Koha/Acquisition/BasketGroup.pm b/Koha/Acquisition/BasketGroup.pm >index 69a8738a67..74af77720d 100644 >--- a/Koha/Acquisition/BasketGroup.pm >+++ b/Koha/Acquisition/BasketGroup.pm >@@ -27,10 +27,26 @@ Koha::Acquisition::BasketGroup - Koha Basket group Object class > > =head1 API > >-=head2 Class Methods >+=head2 Class methods >+ >+=head3 to_api_mapping >+ >+This method returns the mapping for representing a Koha::Acquisition::BasketGroup object >+on the API. > > =cut > >+sub to_api_mapping { >+ return { >+ id => 'basket_group_id', >+ booksellerid => 'vendor_id', >+ deliveryplace => 'delivery_library_id', >+ freedeliveryplace => 'delivery_place', >+ deliverycomment => 'delivery_note', >+ billingplace => 'invoice_library_id', >+ }; >+} >+ > =head2 Internal methods > > =head3 _type >diff --git a/Koha/Schema/Result/Aqbasketgroup.pm b/Koha/Schema/Result/Aqbasketgroup.pm >index da3a3997c2..2511c2df1a 100644 >--- a/Koha/Schema/Result/Aqbasketgroup.pm >+++ b/Koha/Schema/Result/Aqbasketgroup.pm >@@ -138,6 +138,9 @@ __PACKAGE__->belongs_to( > # Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53 > # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9cEWAMwcFKPYPEG1CaaD3w > >+__PACKAGE__->add_columns( >+ '+closed' => { is_boolean => 1 } >+); > > sub koha_object_class { > 'Koha::Acquisition::BasketGroup'; >-- >2.20.1
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 24461
:
97623
|
100278
|
101536
| 101537