Bugzilla – Attachment 158930 Details for
Bug 30070
Performance issues with edifactmsgs when you have a large number of messages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30070: (follow-up) Filter out deleted files on the API
Bug-30070-follow-up-Filter-out-deleted-files-on-th.patch (text/plain), 2.13 KB, created by
Martin Renvoize (ashimema)
on 2023-11-14 15:23:30 UTC
(
hide
)
Description:
Bug 30070: (follow-up) Filter out deleted files on the API
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-11-14 15:23:30 UTC
Size:
2.13 KB
patch
obsolete
>From 2e4fcfa4535cbb3c9fbb7b3a7caf5f216996d036 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 14 Nov 2023 15:07:01 +0000 >Subject: [PATCH] Bug 30070: (follow-up) Filter out deleted files on the API > >EDI uses a 'deleted' flag in the table to denote deleted files, we >should filter those out of the API response. >--- > Koha/Edifact/File.pm | 1 + > Koha/REST/V1/Acquisitions/Vendor/Edifact/Files.pm | 6 ++++-- > api/v1/swagger/definitions/edifact_file.yaml | 5 ----- > 3 files changed, 5 insertions(+), 7 deletions(-) > >diff --git a/Koha/Edifact/File.pm b/Koha/Edifact/File.pm >index 2fd475221c9..66937acc27e 100644 >--- a/Koha/Edifact/File.pm >+++ b/Koha/Edifact/File.pm >@@ -68,6 +68,7 @@ sub to_api_mapping { > return { > message_type => 'type', > basketno => 'basket_id', >+ deleted => undef, > }; > } > >diff --git a/Koha/REST/V1/Acquisitions/Vendor/Edifact/Files.pm b/Koha/REST/V1/Acquisitions/Vendor/Edifact/Files.pm >index 1f4ae3fc09e..fe9e2f3ed1c 100644 >--- a/Koha/REST/V1/Acquisitions/Vendor/Edifact/Files.pm >+++ b/Koha/REST/V1/Acquisitions/Vendor/Edifact/Files.pm >@@ -46,16 +46,18 @@ Return the list of edifact files > sub list { > my $c = shift->openapi->valid_input or return; > >+ my $filter = { deleted => 0 }; > return try { > >- my $files_rs = Koha::Edifact::Files->new; >+ my $files_rs = Koha::Edifact::Files->search($filter); > my $files = $c->objects->search($files_rs); > > return $c->render( > status => 200, > openapi => $files, > ); >- } catch { >+ } >+ catch { > $c->unhandled_exception($_); > }; > } >diff --git a/api/v1/swagger/definitions/edifact_file.yaml b/api/v1/swagger/definitions/edifact_file.yaml >index 4f32fbe4cdc..2f7699de802 100644 >--- a/api/v1/swagger/definitions/edifact_file.yaml >+++ b/api/v1/swagger/definitions/edifact_file.yaml >@@ -55,9 +55,4 @@ properties: > - string > - "null" > description: Edifact file name >- deleted: >- type: >- - boolean >- - "null" >- description: Is this file deleted > additionalProperties: false >-- >2.41.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 30070
:
158808
|
158809
|
158810
|
158887
|
158903
|
158904
|
158905
|
158906
|
158907
|
158908
|
158909
|
158910
|
158911
|
158912
|
158913
|
158914
|
158915
|
158918
|
158920
|
158922
|
158923
|
158924
|
158925
|
158926
|
158927
|
158928
|
158929
|
158930
|
158931
|
158932
|
158933
|
158934
|
158935
|
158936
|
158937
|
158938
|
158939
|
158940
|
158941
|
158942
|
158943
|
158944
|
158945
|
158946
|
158947
|
158948
|
158949
|
158950
|
158951
|
158952
|
158953
|
158954
|
158955
|
158963
|
158964
|
158965
|
158966
|
158967
|
158968
|
158969
|
158970
|
158971
|
158972
|
158973
|
158974
|
158975
|
159026
|
159027
|
159028
|
159029
|
159030
|
159031
|
159032
|
159033
|
159034
|
159035
|
159036
|
160336
|
160337
|
160338
|
160339
|
160340
|
160341
|
160342
|
160343
|
160344
|
160345
|
160346
|
160347
|
160348