Bugzilla – Attachment 168743 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: Fix for unmapped tablename filtering
Bug-37262-Fix-for-unmapped-tablename-filtering.patch (text/plain), 1.96 KB, created by
Tomás Cohen Arazi (tcohen)
on 2024-07-10 13:35:35 UTC
(
hide
)
Description:
Bug 37262: Fix for unmapped tablename filtering
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2024-07-10 13:35:35 UTC
Size:
1.96 KB
patch
obsolete
>From 92ba42a24d69f250b1c33335d0a5c2f8246d2355 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Fri, 5 Jul 2024 12:10:16 +0000 >Subject: [PATCH] Bug 37262: Fix for unmapped tablename filtering > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Edit: amended to tidy the new code (tcohen) >--- > Koha/REST/V1/ExtendedAttributeTypes.pm | 6 +++++- > api/v1/swagger/paths/extended_attribute_types.yaml | 3 +++ > 2 files changed, 8 insertions(+), 1 deletion(-) > >diff --git a/Koha/REST/V1/ExtendedAttributeTypes.pm b/Koha/REST/V1/ExtendedAttributeTypes.pm >index 1cc402d7045..528197ad0c3 100644 >--- a/Koha/REST/V1/ExtendedAttributeTypes.pm >+++ b/Koha/REST/V1/ExtendedAttributeTypes.pm >@@ -53,9 +53,13 @@ sub list { > > return try { > my $additional_fields_set = Koha::AdditionalFields->new; >- if ($resource_type) { >+ if ( $resource_type && $resource_to_table->{$resource_type} ) { > $additional_fields_set = > $additional_fields_set->search( { tablename => $resource_to_table->{$resource_type} } ); >+ } elsif ($resource_type) { >+ $additional_fields_set = $additional_fields_set->search( { tablename => $resource_type } ); >+ } else { >+ $additional_fields_set = $additional_fields_set->search(); > } > > return $c->render( >diff --git a/api/v1/swagger/paths/extended_attribute_types.yaml b/api/v1/swagger/paths/extended_attribute_types.yaml >index f96049f1ed9..f49d54b91e4 100644 >--- a/api/v1/swagger/paths/extended_attribute_types.yaml >+++ b/api/v1/swagger/paths/extended_attribute_types.yaml >@@ -17,6 +17,9 @@ > - basket > - 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