Bug 402195 - CSV importer: Opposite signs option not read from banking profile
Summary: CSV importer: Opposite signs option not read from banking profile
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: importer (show other bugs)
Version: 5.0.1
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-16 14:46 UTC by Mark
Modified: 2018-12-18 21:02 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.0.3
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark 2018-12-16 14:46:42 UTC
SUMMARY

The "Opposite signs" checkbox (great new feature, btw) is not being initialized from the value stored in the Banking profile in csvimporterrc. The value is stored correctly in csvimporterrc as OppositeSigns=true but the checkbox is always unchecked when the profile is re-used.


STEPS TO REPRODUCE

1. Invoke File->Import->CSV.
2. Add a new Banking profile.
3. Select a CSV file to import.
4. Select separators and data range rows as usual.
5. On step 4 (Columns), check the "Opposite signs" checkbox.
6. Proceed to step 5 and hit "Finish" to save the new profile.
7. Invoke File->Import->CSV.
8. Select the Banking profile created at step 2.
9. Select a CSV file to import.
10. Select separators and data range rows as usual.
11. On step 4 (Columns), note that the "Opposite signs" checkbox is now unchecked.

OBSERVED RESULT

"Opposite signs" checkbox is always cleared when importing an existing Banking profile.

EXPECTED RESULT

"Opposite signs" checkbox is initialized from the value stored in the Banking profile.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: 
- Operating System: Xubuntu 18.04.1 LTS
- Kernel: Linux 4.15.0-42-generic
- Architecture: x86-64
- Repository: http://ca.archive.ubuntu.com/ubuntu/ bionic universe
- Package: kmymoney 5.0.1-2
KDE Frameworks: 5.44.0
Qt Version:  5.9.5
Comment 1 Mark 2018-12-16 14:50:54 UTC
Bug traced to BankingProfile::readSettings() in kmymoney/plugins/csv/import/core/csvimportercore.cpp :

-  m_oppositeSigns = profilesGroup.readEntry(CSVImporterCore::m_miscSettingsConfName.value(ConfOppositeSigns), 0);
+  m_oppositeSigns = profilesGroup.readEntry(CSVImporterCore::m_miscSettingsConfName.value(ConfOppositeSigns), false);
Comment 2 Thomas Baumgart 2018-12-18 21:02:03 UTC
Git commit c21f3048ad686981352686b8d2da58e5c326278a by Thomas Baumgart.
Committed on 18/12/2018 at 21:00.
Pushed by tbaumgart into branch '5.0'.

Correctly read opposite signs option from banking profile

The "Opposite signs" checkbox is not being initialized from the value
stored in the Banking profile in csvimporterrc. The value is stored
correctly in csvimporterrc as OppositeSigns=true but the checkbox is
always unchecked when the profile is re-used. This change fixes the
problem.

Thanks to Mark for providing the fix.
FIXED-IN: 5.0.3

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

https://commits.kde.org/kmymoney/c21f3048ad686981352686b8d2da58e5c326278a