Bugzilla – Attachment 116894 Details for
Bug 27569
marc-framework import function doesn't accept LibreOffice csv/ods file formats
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27569: Fix ODS export - take empty string into account
Bug-27569-Fix-ODS-export---take-empty-string-into-.patch (text/plain), 2.09 KB, created by
Katrin Fischer
on 2021-02-15 21:01:27 UTC
(
hide
)
Description:
Bug 27569: Fix ODS export - take empty string into account
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2021-02-15 21:01:27 UTC
Size:
2.09 KB
patch
obsolete
>From 6c83ad03ef41286b47032ac294ca2be680795c0c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 1 Feb 2021 15:57:24 +0100 >Subject: [PATCH] Bug 27569: Fix ODS export - take empty string into account > >If a cell contains an empty string it was not taken into account. > >Test plan: >Same as CSV but with ODS > >Signed-off-by: Ron Houk <rhouk@ottumwapubliclibrary.org> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > C4/ImportExportFramework.pm | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/C4/ImportExportFramework.pm b/C4/ImportExportFramework.pm >index 2350cfa446..ea4884f12d 100644 >--- a/C4/ImportExportFramework.pm >+++ b/C4/ImportExportFramework.pm >@@ -907,6 +907,8 @@ sub _processRows_Table > my ($dataFields, $dataFieldsR) = _getDataFields($frameworkcode, $nodeR, \@fields, $format); > if (scalar(@fields) == scalar(@$dataFieldsR)) { > $ok = _processRow_DB($dbh, $table, $fields, $dataStr, $updateStr, $dataFieldsR, $dataFields, $PKArray, \@fieldsPK, $fields2Delete); >+ } else { >+ warn "$j don't match number of fields " . scalar(@fields) . ' vs ' . scalar(@$dataFieldsR) . "($dataStr)"; > } > } > $j++; >@@ -1079,7 +1081,7 @@ sub _getDataFields > if ($format && $format eq 'ods') { > ($data, $repeated) = _getDataNodeODS($node2) if ($repeated <= 0); > $repeated--; >- $ok = 1 if (defined($data)); >+ $ok = 1; > } else { > if ($node2->nodeType == 1 && $node2->nodeName =~ /(?:ss:)?Cell/) { > my @nodes3 = $node2->getElementsByTagNameNS('urn:schemas-microsoft-com:office:spreadsheet', 'Data'); >@@ -1090,6 +1092,7 @@ sub _getDataFields > } > } > if ($ok) { >+ $data //= ''; > $data = '' if ($data eq '#'); > $data = $frameworkcode if ($fields->[$i] eq 'frameworkcode'); > $dataFields->{$fields->[$i]} = $data; >-- >2.11.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 27569
:
116164
|
116165
|
116166
|
116167
|
116168
|
116169
|
116170
|
116871
|
116872
|
116873
|
116874
|
116875
|
116876
|
116877
|
116888
|
116889
|
116890
|
116891
|
116892
|
116893
| 116894