Bug 409705 - Add category adds as subcategory of selected, which doesn't match the Name line.
Summary: Add category adds as subcategory of selected, which doesn't match the Name line.
Status: RESOLVED FIXED
Alias: None
Product: skrooge
Classification: Applications
Component: general (show other bugs)
Version: Trunk from git
Platform: Flatpak Linux
: NOR minor
Target Milestone: ---
Assignee: Stephane MANKOWSKI
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-11 00:32 UTC by skierpage
Modified: 2022-11-05 12:42 UTC (History)
1 user (show)

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 skierpage 2019-07-11 00:32:54 UTC
SUMMARY
Adding a category adds it as a subcategory of what's selected, which is confusing.

STEPS TO REPRODUCE
For example you want to add a subcategory of Bills (one of the standard categories) called Internet
1. Open Skrooge, click Categories
2. Click Bills, then click Bills > Fuel Oil (I think this is one of the standard subcategories)
3. Type "Internet" in place of "Fuel Oil" in the Name line.
4. Click the + add button.

OBSERVED RESULT
The Name line displays Bills > Internet , but the new category is created as a subcategory of what you had previously selected, i.e. Bills > Fuel Oil > Internet.

EXPECTED RESULT
The Name line should match what category is created, so if it shows Bills > Internet, then that's the hierarchy I would expect gets created. However, that would make it hard when you want to create a subcategory of something that doesn't have any existing subcategories. Hmmm... hard problem!

SOFTWARE/OS VERSIONS 
Linux/KDE Plasma: 
(from flatpak)
KDE Plasma Version: n/a 
KDE Frameworks Version: 5.59.0
Qt Version: 5.12.4 (xcb)

ADDITIONAL INFORMATION
The workaround to unexpected behavior is to drag the newly-created category where it belongs.

The Skrooge Handbook https://docs.kde.org/trunk5/en/extragear-office/skrooge/categories.html should explain the Add behavior, and should mention that you can drag categories into and out of subcategories to rearrange them in case the new category isn't where you want it in the hierarchy.

The Add action for Categories uses a different icon and layout and has no help or tooltip (Bug 409703); maybe its help/tooltip could dynamically show the result of clicking it, e.g. "Create new subcategory of Bills > Fuel Oil").
Comment 1 Stephane MANKOWSKI 2022-11-05 12:42:22 UTC
Git commit bdc19dada38b31b51fe23aaa22f96d31f76ed865 by Stephane Mankowski.
Committed on 05/11/2022 at 12:41.
Pushed by smankowski into branch 'master'.

Add category adds as subcategory of selected, which doesn't match the Name line

M  +1    -0    CHANGELOG
M  +8    -1    plugins/skrooge/skrooge_categories/skgcategoriespluginwidget.cpp
M  +31   -10   plugins/skrooge/skrooge_categories/skgcategoriespluginwidget_base.ui
M  +1    -1    skgbankmodeler/skgimportexportmanager.h
M  +1    -1    tests/skgbankmodelertest/skgtestimportskg.cpp

https://invent.kde.org/office/skrooge/commit/bdc19dada38b31b51fe23aaa22f96d31f76ed865