Created attachment 137908 [details] Dialog after creating a new category from the ledger view SUMMARY Entering a new ledger entry allows to auto-create a new category if it does not exist. The dialog explains that the parent category will be Expense/Income, but can be changed in the next dialog. Selecting the correct parent category in the next dialog does not work as intended. Instead of adding the new category under the selected parent, it duplicates the whole category structure under the new parent entry. STEPS TO REPRODUCE 1. Enter new ledger entry 2. Enter non-existing category, e.g. "Food:Groceries:Fruit" 3. Click "Yes" in next dialog 4. Change parent category, e.g. from "Expense" to "Expense:Food:Groceries" 5. Click "OK" OBSERVED RESULT New category structure is "Food:Groceries:Food:Groceries:Fruit" EXPECTED RESULT New category structure should be "Food:Groceries:Fruit" SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION
Created attachment 137909 [details] Selecting the correct parent
Created attachment 137910 [details] Actual parent is shown on the bottom of this screenshot
The application works as intended. In case you provide a hierarchy (account names separated by colons) to be created, KMyMoney will do so under the parent account you select. Even if the names are identical to those in the parent, the whole path will be added to the selected parent. Select Expense as the parent and things are working as expected by you. In case parts of the hierarchy exist already they will be used. Only missing parts will be created.
I suppose that the new account together with its structure (e.g. "Food:Groceries:Food:Groceries:Fruit") could be hinted on the Hierarchy Tab to avoid confusion.
Thank you for looking into this. I agree that a hint in the dialog would help. My expectation was that the dialog asks where to place the new category and not where to place the whole category structure. The initial dialog made it look like "Fruit" would become a direct child of the "Expense" parent account and that action was required to put it in the right place.
Git commit 4e782229d6122a9939bbd5fdafb0bd6560c37fb3 by Thomas Baumgart. Committed on 01/05/2021 at 06:12. Pushed by tbaumgart into branch 'master'. Improve information about account position in hierarchy M +15 -3 kmymoney/dialogs/knewaccountdlg.cpp https://invent.kde.org/office/kmymoney/commit/4e782229d6122a9939bbd5fdafb0bd6560c37fb3