Bug 229638

Summary: Editing price in Price Editor always sets date to current date
Product: [Applications] kmymoney Reporter: Ian Neal <iann_bugzilla>
Component: generalAssignee: Ian Neal <iann_bugzilla>
Status: RESOLVED FIXED    
Severity: normal CC: kmymoney-devel
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Remove setting of current date patch for kmm4
Backport of remove setting of current date patch for kmm2
Updated backport to kmm2 which includes valid date check patch v2

Description Ian Neal 2010-03-06 02:34:19 UTC
Version:           3.96.1 (using KDE 4.4.0)
Compiler:          gcc 4.4.1 
OS:                Linux
Installed from:    Fedora RPMs

Steps to reproduce:
1) Open price editor
2) Select an existing entry
3) Click on edit button or select edit from context menu
4) Exchange Rate/Price Editor dialog opens

Expected result
1) Date from selected entry should be showing

Actual result
1) Current date is shown
Comment 1 Ian Neal 2010-03-06 02:37:40 UTC
Created attachment 41368 [details]
Remove setting of current date patch for kmm4

All this patch does is remove the line that sets the date to be the current date from setupPriceEditor.
Comment 2 Ian Neal 2010-03-06 02:39:41 UTC
Created attachment 41369 [details]
Backport of remove setting of current date patch for kmm2

Equivalent patch for kmymoney2
Comment 3 Alvaro Soliverez 2010-03-06 02:46:46 UTC
The currency calculator is used all over the place, not only the price editor dialog, from schedules to the ledger.

A solution is to make sure a date is set upon construction, with the calling party setting the corresponding date (date of transaction, schedule, investment transaction, etc.)
Comment 4 Ian Neal 2010-03-06 02:57:05 UTC
(In reply to comment #3)
> The currency calculator is used all over the place, not only the price editor
> dialog, from schedules to the ledger.
> 
> A solution is to make sure a date is set upon construction, with the calling
> party setting the corresponding date (date of transaction, schedule, investment
> transaction, etc.)

Sorry, I should have said, I'd already checked that all the callers do set a date.
Comment 5 Alvaro Soliverez 2010-03-08 00:20:56 UTC
Commit it to SVN, then.
Comment 6 Ian Neal 2010-03-08 23:37:06 UTC
SVN commit 1100896 by iann:

BUG: 229638
Editing price in Price Editor always sets date to current date



 M  +0 -1      kcurrencycalculator.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1100896
Comment 7 Ian Neal 2010-03-13 22:00:24 UTC
SVN commit 1102870 by iann:

BUG: 229638
Check for invalid date too


 M  +4 -1      kcurrencycalculator.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1102870
Comment 8 Ian Neal 2010-03-13 22:03:59 UTC
Created attachment 41603 [details]
Updated backport to kmm2 which includes valid date check patch v2

Rolls up the two commits to kmm4 into one patch backported for kmm2.