Bug 405817 - CSV importer trailing lines are treated as absolute lines
Summary: CSV importer trailing lines are treated as absolute lines
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: importer (show other bugs)
Version: 5.0.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-24 15:07 UTC by Thomas Baumgart
Modified: 2019-03-24 15:13 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.0.4


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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