Hello,
The nesting is getting hard to read, but I see two separate issues
remaining.
On 2020.07.31 10:50, lampsh8de wrote:
Thanks for your reply.
Please see further annotated comments for your attention:
First - It seems a category cannot be deleted if it is the default
category for a payee. That seems to be why all these categories
cannot be deleted.
"Okay, this meansthat the removing of all associations (including
payee) would allow category deletion? How do I trace and remove payee
associations? Trust this is a straightforward process?"
Unfortunately, I don't know any easy way to do this within the UI.
I'll consider filing a wishlist, both to find payees for which a
category is the default, and to improve the information about why a
category can't be deleted (one might already exist.). The way you can
do it now, is to grep your data file. For example, "grep A000111
KMyMoney_Data_test.anon.xml" gives me
<PAYEE id="P002488" name="P002488" reference="" matchignorecase="1"
usingmatchkey="1" email="" matchingenabled="1"
matchkey="^xxxx&xxxx$" defaultaccountid="A000111">
<PAYEE id="P002504" name="P002504" reference="" matchignorecase="1"
usingmatchkey="1" email="" matchingenabled="1" matchkey="^xxxxxxx$"
defaultaccountid="A000111">
as well as other lines. The 'defaultaccountid="A000111"' is the key -
and the id=P00nnnn at the beginning tells you which payee. In a real
file, you would use the name instead of id. They are the same here,
just because it is an anonymized file. If your data file is xxx.kmy,
you would need to "cp xxx.kmy xxx.xml.gz" then "gunzip xxx.xml.gz" and
grep against the resulting xxx.xml.
A000111 is default category for P002488 and P002504, and removing
those
default categories enables delete for that category.
Delete is not enabled for Category A000004, even after is becomes
enable for A000111.
"At no stage did I want to delete any category before moving its
contents. This all started because I was prevented from deleting
categories which appeared to have zero content. The delete option
being greyed out. I didn’t know about the payee associations. In the
absence of this knowledge, the workaround I employed was to move the
5 sub-categories (A000111, A000057, 088, 106 and A000005), which I
couldn't delete,into a freshly created parent category. I had
actually given up on my attempt to delete these categories and was
merely tidying up by putting themall in one place. But Ithen wondered
what would happen if I then tried to delete my freshlycreated parent
category which contained these5 sub-categories. To my surprise and
pleasure, the delete option for this main category and the 5
sub-categories was now possible. The option of deleting the
sub-categorieswas now possible via deletion of the main category (see
attached screen shot of dialogue that opens after right-clicking main
category and selecting delete)."
Yes, I got the same popup, but after clicking to delete all of them, I
got a second message that they could not all be deleted, so either
cancel or move them up a level.
A000053 (delete disabled) is subcategory of A000018 (delete enabled)
A000057, 088, and 106 are each the default category for one or three
Payees.
A000005 is a default category for Payee 002440.
Trying to delete category A000046 first asked which other category to
assigne associated transactions, and then said that there were sub
categoreis which could not be deleted, and to proceed, they would be
made subcategories of Exmpense.
"This is not what I wanted to do nor did I try to do so."
Are you sure that when you deleted a parent category, the undeletable
subcategory was really deleted along with it, or was it just moved up
to a top level expense category?
"The only parent category that I tried and succeeded in deletingwas
the one that I freshly created."
I think all the rest is related. In my case, when I deleted a
category, if it had a subcategory which was not directly deletable,
then the subcategory was NOT deleted - either it was moved to the top
level or the parent category was not deleted either. So I ask again,
can you confirm you deleted a category (top level, newly created,
empty) and a subjcategory (which could not be deleted because it was
the default category for some payee) was also deleted, and not just
moved up a level in the category hierarchy? If you did, and we can
repeat it, I think it counts as a bug.
On 31/07/2020 07:43, Thomas Baumgart wrote:
FYI, since you are not subscribed to the list.
---------- Forwarded Message ----------
Subject: Re: Unable to delete some kmy categories which are greyed
out, first posted on Fri Jul 24, 2020 3:05 pm
Date: Donnerstag, 30. Juli 2020, 22:21:22 CEST
From: Jack <ostrof...@users.sourceforge.net>
To: kmymoney-devel@kde.org
On 2020.07.30 10:21, lampsh8de wrote:
Hello,
Please find attached file as requested. The problem categories
relating to the above post are as follows:
1 sub-category of A000004 (A000111)
3 sub-categories of A000053 (A000057, 088, 106)
1 sub-category of A000046 (A000005)
Thanks for looking at this.
(I'm using KMM compiled from git head of 5.1 branch)
First - It seems a category cannot be deleted if it is the default
category for a payee. That seems to be why all these categories
cannot
be deleted.
A000111 is default category for P002488 and P002504, and removing
those
default categories enables delete for that category.
Delete is not enabled for Category A000004, even after is becomes
enable for A000111.
A000053 (delete disabled) is subcategory of A000018 (delete enabled)
A000057, 088, and 106 are each the default category for one or three
Payees.
A000005 is a default category for Payee 002440.
Trying to delete category A000046 first asked which other category to
assigne associated transactions, and then said that there were sub
categoreis which could not be deleted, and to proceed, they would be
made subcategories of Exmpense.
Are you sure that when you deleted a parent category, the undeletable
subcategory was really deleted along with it, or was it just moved up
to a top level expense category?
Question for the developers: when you delete a category, it asks what
other category to assign associated transactions to. Is there any
reason not to reassign payee default categories (and scheduled
transactions) in the same way?
Jack