Bugzilla – Attachment 168744 Details for
Bug 37262
api/v1/extended_attribute_types does not filter additional fields for unmapped tablenames
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37262: (follow-up) Rename types/tables
Bug-37262-follow-up-Rename-typestables.patch (text/plain), 2.30 KB, created by
Tomás Cohen Arazi (tcohen)
on 2024-07-10 13:35:37 UTC
(
hide
)
Description:
Bug 37262: (follow-up) Rename types/tables
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2024-07-10 13:35:37 UTC
Size:
2.30 KB
patch
obsolete
>From 768d2c9ce50670a46e119f314edf0aa788f9a48f Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 10 Jul 2024 13:23:04 +0000 >Subject: [PATCH] Bug 37262: (follow-up) Rename types/tables > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/AdditionalField.pm | 8 +++++--- > Koha/REST/V1/ExtendedAttributeTypes.pm | 2 ++ > api/v1/swagger/paths/extended_attribute_types.yaml | 4 ++-- > 3 files changed, 9 insertions(+), 5 deletions(-) > >diff --git a/Koha/AdditionalField.pm b/Koha/AdditionalField.pm >index 25d6808c160..a9230ff6668 100644 >--- a/Koha/AdditionalField.pm >+++ b/Koha/AdditionalField.pm >@@ -55,9 +55,11 @@ sub to_api { > my ( $self, $params ) = @_; > > my $table_to_resource = { >- 'aqbasket' => 'basket', >- 'aqinvoices' => 'invoice', >- 'aqorders' => 'order', >+ 'accountlines:credit' => 'credit', >+ 'accountlines:debit' => 'debit', >+ 'aqbasket' => 'basket', >+ 'aqinvoices' => 'invoice', >+ 'aqorders' => 'order', > }; > > my $json = $self->SUPER::to_api($params); >diff --git a/Koha/REST/V1/ExtendedAttributeTypes.pm b/Koha/REST/V1/ExtendedAttributeTypes.pm >index 528197ad0c3..c49fddc2327 100644 >--- a/Koha/REST/V1/ExtendedAttributeTypes.pm >+++ b/Koha/REST/V1/ExtendedAttributeTypes.pm >@@ -47,6 +47,8 @@ sub list { > # FIXME: Maybe not the best place for this mapping > my $resource_to_table = { > basket => 'aqbasket', >+ credit => 'accountlines:credit', >+ debit => 'accountlines:debit', > invoice => 'aqinvoices', > order => 'aqorders', > }; >diff --git a/api/v1/swagger/paths/extended_attribute_types.yaml b/api/v1/swagger/paths/extended_attribute_types.yaml >index f49d54b91e4..f20eb2ff585 100644 >--- a/api/v1/swagger/paths/extended_attribute_types.yaml >+++ b/api/v1/swagger/paths/extended_attribute_types.yaml >@@ -15,11 +15,11 @@ > type: string > enum: > - basket >+ - credit >+ - debit > - invoice > - order > - subscription >- - accountlines:credit >- - accountlines:debit > - $ref: "../swagger.yaml#/parameters/match" > - $ref: "../swagger.yaml#/parameters/order_by" > - $ref: "../swagger.yaml#/parameters/page" >-- >2.45.2
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 37262
:
168533
|
168534
|
168589
|
168590
|
168613
|
168614
|
168742
|
168743
|
168744
|
168752