Bug 421288 - Unable to delete some categories
Summary: Unable to delete some categories
Status: RESOLVED NOT A BUG
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 5.0.8
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-10 15:18 UTC by Michael Carpino
Modified: 2020-07-31 17:43 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
attachment-26563-0.html (1.34 KB, text/html)
2020-05-10 22:17 UTC, Dawid Wróbel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Carpino 2020-05-10 15:18:53 UTC
SUMMARY
I have some categories that I can't delete when I right click on the category the Delete category is greyed out. These categories are only in expenses and there is only approximately 12 of them that have the Delete category greyed out.  Some of these categories I wish to delete have no transactions and some have transactions so it appears to make no difference. Of my other categories that have transactions and I don't want to delete I can delete those should I choose to. 

OBSERVED RESULT  Can't delete category for some expenses


EXPECTED RESULT  Ability to delete any category


SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Ubuntu 20.04 Kernel 5.4.0-29-generic



ADDITIONAL INFORMATION
Comment 1 Jack 2020-05-10 16:25:19 UTC
Having transactions does not prevent deletion of a category, because you will then be asked what other category those transactions should be assigned to.

I wonder if those categories you can't delete are closed (they are actually accounts) but I can't find any way in the program to open or close category accounts, so I don't know how it could have happened.

Can you provide a sample kmy file?  Perhaps save your file anonymized, and confirm it still shows the same problem?
Comment 2 Brendan 2020-05-10 16:27:32 UTC
Are they be used in scheduled transactions? Would that stop them from being deleted?
Comment 3 Thomas Baumgart 2020-05-10 17:15:44 UTC
The following items are not checked for references when the deletion is disabled for categories:

- Transactions
- Accounts/Categories
- Schedules
- Budgets

This would leave reports as a candidate if you ask me.
Comment 4 Dawid Wróbel 2020-05-10 22:17:23 UTC
Created attachment 128345 [details]
attachment-26563-0.html

Should we maybe leave the option enabled at all times but show appropriate
message with explanation of impossible to delete?

I too had a similar problem with deleting my investment accounts that had
securities configured, the first time I used that functionality in kmymoney.

On Sun, May 10, 2020 at 1:15 PM Thomas Baumgart <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=421288
>
> --- Comment #3 from Thomas Baumgart <tbaumgart@kde.org> ---
> The following items are not checked for references when the deletion is
> disabled for categories:
>
> - Transactions
> - Accounts/Categories
> - Schedules
> - Budgets
>
> This would leave reports as a candidate if you ask me.
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
Comment 5 Jack 2020-05-11 22:36:20 UTC
Rather than leave the delete enabled, and then have to block it anyway, I would much prefer to see a better way to inform the use of why the delete (or, in fact any action) is not allowed.  Displaying that information in a tool-tip would work, but it might also be reasonable to show it in a status are, such as at the bottom of the main window.  I think this is actually a much broader issue than just not being able to delete some object.
Comment 6 Michael Carpino 2020-07-31 17:43:20 UTC
I am closing this issue/bug as it is not a bug because of a recent issue I was following on the KMM Forum that resolves the problem.  

The categories that I was unable to delete was because I have payees that I defined/assigned as the default category. As soon as I removed the default category for the payee then I am miraculously (sarcasm) able to delete the category.