Bug 405817

Summary: CSV importer trailing lines are treated as absolute lines
Product: [Applications] kmymoney Reporter: Thomas Baumgart <tbaumgart>
Component: importerAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 5.0.3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.0.4
Sentry Crash Report:

Description Thomas Baumgart 2019-03-24 15:07:22 UTC
SUMMARY
If some trailing lines are specified in a CSV import profile, the number is not treated as relative from the end but rather as absolute line number. See https://forum.kde.org/viewtopic.php?f=69&t=152769 for the origin of this problem.

STEPS TO REPRODUCE
1. Import a CSV file containing 6 lines
2. Specify line 5 as last one
3. Import a CSV file containing 7 lines

OBSERVED RESULT
Line 5 is used as the last line containing data

EXPECTED RESULT
Line 6 is used as the last line containing data

ADDITIONAL INFORMATION
Comment 1 Thomas Baumgart 2019-03-24 15:13:11 UTC
Git commit 03e9da796f356c7e0b6406a66c4222410ce8e56c by Thomas Baumgart.
Committed on 24/03/2019 at 15:12.
Pushed by tbaumgart into branch '5.0'.

Treat footer lines in CSV import relative to EOF
FIXED-IN: 5.0.4

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

https://commits.kde.org/kmymoney/03e9da796f356c7e0b6406a66c4222410ce8e56c