Bug 469587 - Issues after editing an account while editing a transaction
Summary: Issues after editing an account while editing a transaction
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: git (master)
Platform: macOS (DMG) macOS
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-10 16:49 UTC by Dawid Wróbel
Modified: 2023-07-30 10:00 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dawid Wróbel 2023-05-10 16:49:49 UTC
SUMMARY
While editing a transaction in Ledger, if I switch to Accounts view and edit an account there, e.g. by changing its opening date, the transaction edited will show as an empty row when switching back to Ledger view. Double-clicking on it will show a monit message that a transaction is already being edited.  I also managed to crash the app once after closing the account tab with that 'faulty' transaction, but can't reproduce it so far.

STEPS TO REPRODUCE
1. Open an account in ledger
2. Start editing a transaction, don't accept it
3. Switch to Accounts view
4. Edit an account, e.g. change its opening date
5. Switch back to the ledger

OBSERVED RESULT
Previously edited row is now empty

EXPECTED RESULT
The transaction should be shown as previously, with changes made — but not saved — intact.
Comment 1 Thomas Baumgart 2023-05-27 06:09:59 UTC
Git commit d91ddf19767ae5f17c92551dc1e39f95b3661807 by Thomas Baumgart.
Committed on 27/05/2023 at 05:23.
Pushed by tbaumgart into branch 'master'.

Close the editor upon model reset

This resolves the problem reported in #469587 but with a different
result.

M  +12   -4    kmymoney/views/ledgerview.cpp
M  +8    -0    kmymoney/views/transactioneditorbase.cpp
M  +2    -0    kmymoney/views/transactioneditorbase.h

https://invent.kde.org/office/kmymoney/-/commit/d91ddf19767ae5f17c92551dc1e39f95b3661807
Comment 2 Thomas Baumgart 2023-07-30 10:00:15 UTC
Git commit 0233b1bfdb405c3dfff1726d578f051220c795a9 by Thomas Baumgart.
Committed on 30/07/2023 at 11:58.
Pushed by tbaumgart into branch 'master'.

Don't close transaction editor if no change in journal

When an account or category is changed while a transaction editor is
active, keep it open when there is no modification in the journalModel
FIXED-IN: 5.2

M  +49   -44   kmymoney/views/kaccountsview_p.h
M  +19   -17   kmymoney/views/kcategoriesview.cpp

https://invent.kde.org/office/kmymoney/-/commit/0233b1bfdb405c3dfff1726d578f051220c795a9