Bug 497120

Summary: 5.1.80: Autofill transaction resets the Payer/Payee to the alphabetically first
Product: [Applications] kmymoney Reporter: Paul Worrall <p.r.worrall>
Component: ux-uiAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 5.2
Sentry Crash Report:

Description Paul Worrall 2024-12-06 09:44:09 UTC
Using version 5.1.80-a2188af (kmymoney-master-3694-linux-gcc-x86_64.AppImage):

1. Start New Transaction (e.g. Ctrl+Ins)
2. Click in the Payer/Payee field and start typing the name of an existing Payee
3. Use the _Down-Arrow_ key and then Enter to select the payee name from the drop-down list.  N.B. Using the mouse to select the payee does not trigger this bug.
    (auto-fill dialog pops up)
4. Click to select a template and click OK, OR cancel the dialog

OBSERVED RESULT
Payer/Payee is changed to the alphabetically first payee.

EXPECTED RESULT
Payer/Payee field remains what was selected

SYSTEM INFO
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Graphics Platform: Wayland
Comment 1 Thomas Baumgart 2024-12-06 17:45:09 UTC
Git commit 5e522e5864004a83ff9672beca0cc183b97d0582 by Thomas Baumgart.
Committed on 06/12/2024 at 17:44.
Pushed by tbaumgart into branch 'master'.

Don't change the payee during autofill

When a payee is selected using the keyboard navigation and pressing the
return key, opening the autofill dialog caused the payee to be changed
when the autofill operation was completed. This change postpones the
autofill operation until the event loop is reached after the payee has
been selected with the return key.
FIXED-IN: 5.2

M  +22   -9    kmymoney/views/newtransactioneditor.cpp

https://invent.kde.org/office/kmymoney/-/commit/5e522e5864004a83ff9672beca0cc183b97d0582