Bug 510797

Summary: cannot save category after update
Product: [Applications] kmymoney Reporter: somaht <somaht>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: NEEDSINFO WAITINGFORINFO    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.2.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: screenshots as asked, explicit titles
account created prior importing
transaction (with issue) details

Description somaht@free.fr 2025-10-19 18:55:37 UTC
SUMMARY

I cannot save or update category on transactions after importing an ofx files of a credit card (and created the account at this occasion). the save/ update buttons remain grayed, even after having selected a valid category.
I could do it with ofx file imported in the checking account, it was already created

STEPS TO REPRODUCE
1. import ofx
2. crate account while importing
3. try updating category for an imported transaction

OBSERVED RESULT

save/ updated button remain grayed and inactive/disabled

EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: 
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Jack 2025-10-20 00:44:40 UTC
First, what distro are you using, and is this the distro's packaged 5.2.1, or an Appimage/snap/flatpak?
If you save the file, close and restart KMyMoney, is the problem still present?
Is the Category created by the import a valid category?  (I would expect it is, but just want to confirm.)
We need to be sure it is not some reason other than the Category preventing you from saving the transaction.  Can you post a screenshot of the Show Transaction Details window?
Comment 2 somaht@free.fr 2025-10-20 19:08:01 UTC
Created attachment 185932 [details]
screenshots as asked, explicit titles
Comment 3 somaht@free.fr 2025-10-20 19:08:59 UTC
Created attachment 185933 [details]
account created prior importing
Comment 4 somaht@free.fr 2025-10-20 19:11:11 UTC
- category is valid (proposed by KMM)
- version 5.2.1 (Mint)
- I tried creating the account before importing and it then works as we can expect, I can assign a category to transactions and save it
Comment 5 Jack 2025-10-20 19:33:49 UTC
You showed the transaction in the ledger.  I may not have been clear, but what I wanted was the popup from the the menu item Transaction/Show Transaction Details.
From the screen shots it appears you can save the transaction in the Payee View but not in the Ledger for the credit card account - is that correct, or am I not seeing correctly?

I'm still a bit confused.  You say if you create the account first, and then assign the import to that account, everything works.  However, why do you need to assign a category, if the import assigned one, or was did the import use the wrong category?

To go back to the original issue - if you do the ofx import, and tell KMM to create the account at that time, the data does get imported to that account, but if you edit one of the imported transactions, you cannot save any changes?  I know you are trying to change the category, but can you save the transaction if you change something else, such as the memo?  I ask that because I want to be sure it really is the category preventing saving the transaction and not some other reason we are not thinking of.
Comment 6 somaht@free.fr 2025-10-20 21:57:27 UTC
Created attachment 185942 [details]
transaction (with issue)  details
Comment 7 Jack 2025-10-20 22:59:41 UTC
Thank you.  That shows that the import created a transaction without an assigned category.  A category would be shown as a second split.  Both of your earlier attachments showed a category of "abonnements."  I assume you assigned that category manually after completing the import.  

However, I now see something I missed before.  In our first attachment (from ledger after reopening the file)  In that image, the date "13/10/2025" is outlined in red.  This indicates some problem with validating the content of the field.  It looks identical to the date in the other image from the Payee View, so I can't tell what (if anything) is actually wrong with it.  If you click on that date, is there any indication of a problem?  If you simply select the same date in the calendar widget, are you allowed to save the transaction?
Comment 8 Thomas Baumgart 2025-10-21 11:58:35 UTC
Clicking on a widget that has a red frame does not do anything. One needs to hover the mouse over it to see the tool tip which explains the problem. In this case, I can imagine that when the account is created during the import it will get an opening date of the current date. Importing older transactions seems to work, but you cannot modify them since the transaction date is prior to the opening date of the account. To fix this, modify the created account and adjust the opening date. This scenario should also be indicated in said tooltip. Does that make sense and fix the problem?