Bug 455470 - Some split transactions in an account in a foreign currency cannot be edited or deleted
Summary: Some split transactions in an account in a foreign currency cannot be edited ...
Status: RESOLVED NOT A BUG
Alias: None
Product: kmymoney
Classification: Applications
Component: file (show other bugs)
Version: 5.1.2
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-17 10:14 UTC by jlboz
Modified: 2022-10-24 22:30 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jlboz 2022-06-17 10:14:43 UTC
I have been using KMM for a couple of years. My KMM data file has several foreign currency accounts as well as accounts in my base or default currency. Transactions from before 2020 were imported from Quicken. This week I began editing transactions where the foreign currency conversion rate was set at 1:1 which causes errors in reports (see report for bug 455171). I have successfully updated the conversion rates for all transactions in a current account for over two years from 1999, but now I have found transactions that I cannot edit. These are split transactions, each split into eight component sub-transactions. They occur every month, so I have already processed about 26 of these split transactions with earlier dates, but all the ones following that I have tried cannot be edited. Other transactions in this account, including other split transactions, can still be edited, both from earlier and later dates. I wondered if deleting the transaction that cannot be edited and replacing it with an equivalent transaction would help, but the transactions that cannot be edited cannot be deleted either.


STEPS TO REPRODUCE
1. Open the KMM data file and the foreign currency current account which has several years of imported transactions with currency conversion rates to be updated
2. Start with the first month. (Dealing with one month at a time keeps things manageable.) Open each split transaction in turn to edit the splits. (Update each memo field in turn with something trivial and save, which brings up the exchange rate editor. Update the exchange rate and save. Continue for all relevant split elements. Save the split transaction.)
3. When the split transactions for the month have been done, select all remaining transactions for the same month that are not split and are not transfers between accounts in the same currency. Click 'edit' and 'save'. This brings up the exchange rate editor for all the selected transactions in turn. Update the exchange rates and save.
4. Go on to the next month if one is available.

OBSERVED RESULT

After processing 26 months of transactions I found a split transaction that cannot be edited or deleted. It can be opened and the splits can  be displayed but nothing can be edited. With the transaction highlighted I can right-click to see the pop-up menu. There are 15 menu items but only the first three and the 8th to 12th items are available, the rest are greyed out. The first three includes  'edit' and 'edit splits' but neither works because nothing can be edited and the only option available after selecting either is to cancel or discard. I have closed KMM and opened it again. The problem remains. There does not appear to be anything wrong with the file. The 'Consistency Check' tool finds nothing wrong. I have found the same problem with all subsequent instances of this transaction I have tried. (It may be irrelevant, but note these transactions have more split elements than other split transactions in this account, so maybe KMM has some limit on what it can handle.)

EXPECTED RESULT

Edit the transactions and update exchange rates in the same way I edited the same transactions from earlier months.

SOFTWARE/OS VERSIONS
Windows: Windows 10 Pro
Version	21H2
Installed on	‎2020-‎06-‎02
OS build	19044.1706
Experience	Windows Feature Experience Pack 120.2212.4170.0

macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 5.93
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 Jack 2022-06-17 17:28:22 UTC
There was no reason to make this a new bug.  However, there are two things I suggest.  First, if you just hover the mouse over one of the  problem transactions, is there a pop-up (like a tool-tip) showing a reason the transaction cannot be edited?  It usually happens if one of the splits references a closed account.  In such case, you need to reopen that account, edit the transaction, and then re-close the other account.  In addition, if you run the program from command line, you might see a useful message about the problem, but I would favor the first method.  If there isn't any such pop-up, then look through each split and confirm that all referenced accounts are still open.

There is a separate bug open about KMM not providing sufficient information about why some action cannot be performed, but it will probably be a while before it is adequately resolved.
Comment 2 jlboz 2022-06-18 01:35:50 UTC
Thanks for the reply. My first reaction was that your suggestion could not possibly be right since I have already edited over twenty earlier transactions made up of the same set of splits, and anyway they are all split between categories with no transfers to accounts, closed or open. But when I looked again at one of the transactions that cannot be edited I found that the seventh line was different to the previous ones. Instead of a category it is a transfer to a closed account, even though the memo following it is identical, which made it easy to miss the change when editing many other transactions too. So you are right, there is no bug, and it would have been helpful if some message appeared to explain the transaction cannot be edited for as long as it involves a closed account. Sorry to have bothered you, but at least this is resolved and I can continue to update the transactions.
Comment 3 Jack 2022-10-24 22:30:55 UTC
Closing as not a bug, assuming that providing better reasons for not allowing some action is already a separate wishlist.  (bug 312649)  (That bug was originally about telling the user why an account could not be closed, but I just added a comment to include this issue also, making it more general.