Bug 399244

Summary: KMyMoney does not work properly when changing from one file to another
Product: [Applications] kmymoney Reporter: Thomas Baumgart <tbaumgart>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: critical CC: st.vater
Priority: NOR    
Version: git (master)   
Target Milestone: ---   
Platform: unspecified   
OS: All   
Latest Commit: Version Fixed In: 5.0.2

Description Thomas Baumgart 2018-09-30 15:22:04 UTC
When a file is loaded into KMyMoney and another file is opened this file is loaded. Editing a transaction (assigning a category in this case) causes the application to misbehave.

STEPS TO REPRODUCE
1. Open file A.
2. Open the ledger view for an account with an ID which is unknown in file B
3. Open file B.
4. Edit a transaction in the current open ledger and save it

OBSERVED RESULT

An internal error message is displayed that the split references an unknown account.

EXPECTED RESULT

The transaction shall be saved with the new data.
Comment 1 Thomas Baumgart 2018-09-30 15:49:24 UTC
Git commit e9d040d09765945eed73ebe6ede1a313a407dfe5 by Thomas Baumgart.
Committed on 30/09/2018 at 15:49.
Pushed by tbaumgart into branch '5.0'.

Reset current selected account when loading a file

The ID of the currently shown account in the ledger view was not reset
when another file was loaded. This false information was then used while
editing transactions ending in an error message, that the account is
unknown.
FIXED-IN: 5.0.2

M  +11   -4    kmymoney/views/kgloballedgerview.cpp
M  +1    -1    kmymoney/views/kgloballedgerview_p.h
M  +3    -0    kmymoney/views/kmymoneyview.cpp
M  +5    -0    kmymoney/widgets/kmymoneyaccountcombo.cpp

https://commits.kde.org/kmymoney/e9d040d09765945eed73ebe6ede1a313a407dfe5
Comment 2 Thomas Baumgart 2018-10-19 05:37:56 UTC
*** Bug 399013 has been marked as a duplicate of this bug. ***