Bugzilla – Attachment 97623 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.05 KB, created by
Tomás Cohen Arazi (tcohen)
on 2020-01-20 14:09:48 UTC
(
hide
)
Description:
Bug 24461: Add to_api_mapping to Koha::Acquisition::BasketGroup
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2020-01-20 14:09:48 UTC
Size:
2.05 KB
patch
obsolete
>From ecb0b2e25ac8c2d1cc069c4f7ec247b3d0c308d0 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> >--- > Koha/Acquisition/BasketGroup.pm | 18 +++++++++++++++++- > Koha/Schema/Result/Aqbasketgroup.pm | 4 ++++ > 2 files changed, 21 insertions(+), 1 deletion(-) > >diff --git a/Koha/Acquisition/BasketGroup.pm b/Koha/Acquisition/BasketGroup.pm >index a63d8299c4..d3eb973538 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..2f5c112b32 100644 >--- a/Koha/Schema/Result/Aqbasketgroup.pm >+++ b/Koha/Schema/Result/Aqbasketgroup.pm >@@ -138,10 +138,14 @@ __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'; > } >+ > sub koha_objects_class { > 'Koha::Acquisition::BasketGroups'; > } >-- >2.25.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 24461
:
97623
|
100278
|
101536
|
101537