<?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>444741</bug_id>
          
          <creation_ts>2021-10-31 20:26:09 +0000</creation_ts>
          <short_desc>CSV importer: account name auto detection generates too many false-positives</short_desc>
          <delta_ts>2024-12-19 10:04:48 +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.2</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>1</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/1ebd8c704deb2af890aa54c60411f6e627bd8a4b</cf_commitlink>
          <cf_versionfixedin>5.2</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2073771</commentid>
    <comment_count>0</comment_count>
    <who name="Dawid Wróbel">me</who>
    <bug_when>2021-10-31 20:26:09 +0000</bug_when>
    <thetext>SUMMARY
With account name auto detection, CSV importer will automatically attempt to match the imported CSV against existing accounts. However, in case the CSV header only actually contains column names, this may lead to false positives. For example, considering a CSV file containing following header:

&quot;Type,Product,Started Date,Completed Date,Description,Amount,Fee,Currency,State,Balance&quot;

the importer will match against an &quot;Art&quot; account, having found a match for it in &quot;Started&quot;. 

The solution is to make the autodetection configurable per profile, not globally, which will allow to take advantage of its heuristics only when it actually makes sense.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2073774</commentid>
    <comment_count>1</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2021-10-31 20:31:10 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/office/kmymoney/-/merge_requests/127</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2073776</commentid>
    <comment_count>2</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2021-10-31 20:39:16 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/office/kmymoney/-/merge_requests/128</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2138164</commentid>
    <comment_count>3</comment_count>
    <who name="Dawid Wróbel">me</who>
    <bug_when>2022-07-10 17:17:13 +0000</bug_when>
    <thetext>Git commit 9ec90abbc80a92bf8a7673bedac73219c10b7902 by Dawid Wróbel.
Committed on 10/07/2022 at 09:47.
Pushed by wrobelda into branch &apos;5.1&apos;.

[CSV] Configure account autodetection per profile

CSV importer had a global option enabling account name autodetection
based on the header contents. This, however, should only really be
enabled if the CSV file contains actual account name, and therefore
configurable *per profile*.

Also: run clang-format against touched source files.

M  +31   -29   kmymoney/plugins/csv/import/core/csvimportercore.cpp
M  +120  -65   kmymoney/plugins/csv/import/core/csvimportercore.h
M  +39   -24   kmymoney/plugins/csv/import/core/tests/csvimportercore-test.cpp
M  +4    -0    kmymoney/plugins/csv/import/csvwizard.cpp
M  +0    -6    kmymoney/plugins/csv/import/pluginsettings.kcfg
M  +44   -1    kmymoney/plugins/csv/import/rowswizardpage.ui
M  +8    -1    kmymoney/settings/kmymoney.upd

https://invent.kde.org/office/kmymoney/commit/9ec90abbc80a92bf8a7673bedac73219c10b7902</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2138165</commentid>
    <comment_count>4</comment_count>
    <who name="Dawid Wróbel">me</who>
    <bug_when>2022-07-10 17:17:26 +0000</bug_when>
    <thetext>Git commit 1ebd8c704deb2af890aa54c60411f6e627bd8a4b by Dawid Wróbel.
Committed on 10/07/2022 at 09:42.
Pushed by wrobelda into branch &apos;master&apos;.

[CSV] Configure account autodetection per profile

CSV importer had a global option enabling account name autodetection
based on the header contents. This, however, should only really be
enabled if the CSV file contains actual account name, and therefore
configurable *per profile*.

Also: run clang-format against touched source files.

M  +31   -29   kmymoney/plugins/csv/import/core/csvimportercore.cpp
M  +120  -65   kmymoney/plugins/csv/import/core/csvimportercore.h
M  +39   -24   kmymoney/plugins/csv/import/core/tests/csvimportercore-test.cpp
M  +4    -0    kmymoney/plugins/csv/import/csvwizard.cpp
M  +0    -6    kmymoney/plugins/csv/import/pluginsettings.kcfg
M  +44   -1    kmymoney/plugins/csv/import/rowswizardpage.ui
M  +7    -1    kmymoney/settings/kmymoney.upd

https://invent.kde.org/office/kmymoney/commit/1ebd8c704deb2af890aa54c60411f6e627bd8a4b</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>