Bug 447457

Summary: An OFX-imported transaction assigned to "Liability" will change from Deposit to Payment (or other way round) when re-assigned to "Expense"
Product: [Applications] kmymoney Reporter: Dawid Wróbel <me>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version: 5.1.2   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Dawid Wróbel 2021-12-24 06:22:19 UTC
SUMMARY

A transaction assigned to "Liability" will change from Deposit to Payment (or other way round) when re-assigned to "Expense" or "Asset". This only happens once after the initial import of the transaction.

STEPS TO REPRODUCE
1. Import a transaction using OFX (using Direct Connect here, need to check if importing from OFX file applies as well)
2. Re-assign the category from the originally assigned to one of the opposing type (i.e. if it was Liability, assign to Asset or Expense and vice-versa).


OBSERVED RESULT
Notice the transaction changes from Payment to Deposit, or the other way round. Re-assigning the category back to the previous one at this point does nothing.

EXPECTED RESULT
Nothing should change except the category itself when re-assigning the transaction.

ADDITIONAL INFORMATION
This is most likely caused by some inconsistency in how the splits looks like in the imported transaction.
Comment 1 Thomas Baumgart 2021-12-24 09:25:38 UTC
Are you able to provide sample .kmy and .ofx files to reproduce the problem and attach them here? That would help very much.

Note: no need to check if that applies to file import as well. It does, since it uses the same logic.