Bug 279410

Summary: Csv Importer plugin doesn't detect badly formatted date
Product: [Applications] kmymoney Reporter: allan <agander93>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: SVN   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description allan 2011-08-04 23:05:52 UTC
Version:           SVN trunk (using KDE 4.6.0) 
OS:                Linux

Part of the date validation detects an embedded space, treats it as a date field separator and replaces it with a '/' character.  If the actual date is prefixed or suffixed with a space, that too is converted to a separator and an invalid date is detected and flagged, causing the import to fail.

Reproducible: Always

Steps to Reproduce:
Import a csv file containing the date "26/06/11 " .  The plugin replaces the trailing ' ' character with a '/', producing a date "26/06/11/".  This generates four sub-fields, to which the plugin objects.

Actual Results:  
As above.

Expected Results:  
The output date should be ""26/06/2011" - no trailing '/'.

Is there time for this to be committed prior to next release?  It's a single (or half-) line patch, to trim the text date during checking/conversion.
Comment 1 Thomas Baumgart 2011-08-05 06:44:10 UTC
The release is planned for 8. August. If you can apply the fix sooner than that, it should be OK.
Comment 2 allan 2011-08-05 12:48:21 UTC
SVN commit 1245148 by allananderson:

BUG:279410
Part of the date validation detects an embedded space, treats it as a date
field separator and replaces it with a '/' character.  If the actual date is
prefixed or suffixed with a space, that too is converted to a separator and an
invalid date is detected and flagged, causing the import to fail.

 M  +1 -1      convdate.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1245148