Bug 447474

Summary: Stored price not fixed when transaction date is changed
Product: [Applications] kmymoney Reporter: Jan <jan_cecile>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: REPORTED ---    
Severity: wishlist    
Priority: NOR    
Version: 5.0.8   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Jan 2021-12-24 15:13:29 UTC
***
STEPS TO REPRODUCE
1.  Enter a "buy" or "reinvest dividend" transaction in an investment account.  In my case I often duplicate an existing one, and edit it.  This will automatically add a price for the stock in the database.
2. Edit the transaction and change the date.

OBSERVED RESULT

Go to "Tools" "Prices" and check that the price entered for the stock has the wrong (uncorrected) date.
EXPECTED RESULT

Price date should have edited date
SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Thomas Baumgart 2021-12-28 15:45:48 UTC
KMyMoney adds a price to the price table when a 'new' transaction is created. The price entry is then unrelated to the transaction, hence not updated when you modify the transaction. In your case, copying an existing transaction is when the transaction is created and the price entry is made. Therefore, I change that into a wish list item. Maybe, not creating a price entry in case of duplicating a transaction is the right option here, I don't know.