Bug 458962

Summary: Currency of security account changes when account is modified
Product: [Applications] kmymoney Reporter: Thomas Baumgart <tbaumgart>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: grave    
Priority: NOR    
Version: git (master)   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Thomas Baumgart 2022-09-10 13:45:05 UTC
Changing a security account (sub-account of an investment account) using the account editor causes the assignment to the security as currency to be lost.

STEPS TO REPRODUCE
1. Create an investment account and a security within it using the investment view
2. Open the accounts view
3. Start editing the sub-ordinate security account
4. Change the name and press OK
5. Save the changes

OBSERVED RESULT
Account's currency was changed from the security identified by E00... to the base currency.

EXPECTED RESULT
Account's currency does not change 

ADDITIONAL INFORMATION
This is a potential problem in the 5.1 branch as well
Comment 1 Thomas Baumgart 2022-09-10 13:48:17 UTC
Git commit 1f5955065a73d3e6c066013ab605dc24262e43eb by Thomas Baumgart.
Committed on 10/09/2022 at 13:48.
Pushed by tbaumgart into branch 'master'.

Don't modify the currency of a stock account

M  +9    -2    kmymoney/dialogs/knewaccountdlg.cpp

https://invent.kde.org/office/kmymoney/commit/1f5955065a73d3e6c066013ab605dc24262e43eb