<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>437810</bug_id>
          
          <creation_ts>2021-05-29 03:25:44 +0000</creation_ts>
          <short_desc>CSV importer should trim the column contents before importing</short_desc>
          <delta_ts>2021-05-29 03:44:44 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>kmymoney</product>
          <component>importer</component>
          <version>5.1.1</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Dawid Wróbel">me</reporter>
          <assigned_to name="KMyMoney Devel Mailing List">kmymoney-devel</assigned_to>
          
          
          <cf_commitlink>https://invent.kde.org/office/kmymoney/commit/441cb82560b17f71127befd7d02c328eb6930483</cf_commitlink>
          <cf_versionfixedin>5.1.2</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2036413</commentid>
    <comment_count>0</comment_count>
    <who name="Dawid Wróbel">me</who>
    <bug_when>2021-05-29 03:25:44 +0000</bug_when>
    <thetext>SUMMARY
When importing my brokerage account&apos;s transaction history, I did not notice that the SYMBOL column contents were prefixed with a whitespace. When importing such file, the importer correctly (i.e. sans prepending whitespace) created all of the previously missing securities. However, after continuing with the importing of actual transactions, it failed to match the non-trimmed symbol with the previously created trimmed securities. 


STEPS TO REPRODUCE
1. Attempt to import a CSV with symbols having a space in front of them

OBSERVED RESULT
The securities are created as expected with the space trimmed, but the import itself fails with &quot;This imported statement contains investment transactions with no security.  These transactions will be ignored.&quot;

EXPECTED RESULT
The whitespace should be trimmed from all of the cells and the transactions should import properly</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2036415</commentid>
    <comment_count>1</comment_count>
    <who name="Dawid Wróbel">me</who>
    <bug_when>2021-05-29 03:40:23 +0000</bug_when>
    <thetext>Git commit ad144629b6ea089e7152ef8a32c18d9a025c938b by Dawid Wróbel.
Committed on 29/05/2021 at 03:38.
Pushed by wrobelda into branch &apos;5.1&apos;.

Trim whitespace from cells when importing a CSV
FIXED-IN: 5.1.2

M  +1    -1    kmymoney/plugins/csv/import/core/csvutil.cpp

https://invent.kde.org/office/kmymoney/commit/ad144629b6ea089e7152ef8a32c18d9a025c938b</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2036416</commentid>
    <comment_count>2</comment_count>
    <who name="Dawid Wróbel">me</who>
    <bug_when>2021-05-29 03:44:44 +0000</bug_when>
    <thetext>Git commit 441cb82560b17f71127befd7d02c328eb6930483 by Dawid Wrobel, on behalf of Dawid Wróbel.
Committed on 29/05/2021 at 03:44.
Pushed by wrobelda into branch &apos;master&apos;.

Trim whitespace from cells when importing a CSV
FIXED-IN: 5.1.2


(cherry picked from commit ad144629b6ea089e7152ef8a32c18d9a025c938b)

M  +1    -1    kmymoney/plugins/csv/import/core/csvutil.cpp

https://invent.kde.org/office/kmymoney/commit/441cb82560b17f71127befd7d02c328eb6930483</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>