Bug 446566 - Automatically remove tags from transaction when they are about to be deleted
Summary: Automatically remove tags from transaction when they are about to be deleted
Status: RESOLVED NOT A BUG
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 5.0.8
Platform: Mint (Ubuntu based) Linux
: NOR wishlist
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-06 18:12 UTC by Fred
Modified: 2021-12-20 22:52 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
screenshot 'deleting tag entry' (19.83 KB, image/png)
2021-12-06 18:12 UTC, Fred
Details
Button to be pressed to remove tag from transaction (16.07 KB, image/png)
2021-12-08 07:10 UTC, Thomas Baumgart
Details
split items with false tag entries. (46.49 KB, image/png)
2021-12-08 19:36 UTC, Fred
Details
widened tag column after 'X' on false entry (45.27 KB, image/png)
2021-12-09 20:26 UTC, Fred
Details
Split transaction, delete flase tag entry, KMM v 5.0.8 (35.33 KB, image/png)
2021-12-18 17:53 UTC, Fred
Details
Split transaction, delete flase tag entry, KMM v 5.1.2-94 - Just as FYI (33.29 KB, image/png)
2021-12-18 17:54 UTC, Fred
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fred 2021-12-06 18:12:07 UTC
Created attachment 144280 [details]
screenshot 'deleting tag entry'

SUMMARY
During a transaction with split items I entered in the tag field a text that supposed to be the memo text as well as a valid tag. I tried to correct the mistake in the tag field but was not able to edit the contents successfully or to clean the whole field contents.
I saved the transaction.
Select the 'tag' section in the menu to edit the listed tags. I tried to delete the aforementioned 'wrong' tag value.
It responds with a message "unable to remove tags...." (see attached png)
***


STEPS TO REPRODUCE
1. Entered a transaction with split items
2. enter in the tag field an random value e.g. 'abcd'.
3. add another 'valid' tag
4. conform the items on the spli list
5. save transaction
6. go to menu entry 'tags'
7. select form the listed tags the entry showing 'abcd'
8. select the 'delete' action button
9. it should deny the deletion of the tag entry

OBSERVED RESULT
did not delete the entry 'abcd' form the tag field in the split transaction
Did not delete the tag with the value 'abcd'

EXPECTED RESULT
to be able to edit (or to cleanout) the tag field on a split transaction
to be able to delete the falsely created tag (abcd)

SOFTWARE/OS VERSIONS
Linux/Cinnamon
KDE Plasma Version: 
KDE Frameworks Version: 5.68.0 
Qt Version: 5.12.8

ADDITIONAL INFORMATION
Comment 1 Thomas Baumgart 2021-12-08 07:10:42 UTC
Created attachment 144341 [details]
Button to be pressed to remove tag from transaction

The error message states, that you cannot remove a tag that is still in use. First remove it from the/all transaction/s by pressing the "remove icon" next to the tag's text when editing a transaction (see attached screenshot). Save the transaction. Once all references are removed, you can delete the tag from the list.
Comment 2 Thomas Baumgart 2021-12-08 07:12:54 UTC
This feature can be improved in such a way, that the user when trying to remove a tag from the list that is still in use is warned about that usage and has to confirm the operation. In case confirmed, KMyMoney should remove the tag in question from all transactions and then remove it from the list. I rephrase the title and turn this into a wishlist item so that we don't forget.
Comment 3 Fred 2021-12-08 19:34:17 UTC
(In reply to Thomas Baumgart from comment #1)
> Created attachment 144341 [details]
> Button to be pressed to remove tag from transaction
> 
> The error message states, that you cannot remove a tag that is still in use.
> First remove it from the/all transaction/s by pressing the "remove icon"
> next to the tag's text when editing a transaction (see attached screenshot).
> Save the transaction. Once all references are removed, you can delete the
> tag from the list.

Hi Thomas,
in my version of KMM I don't see an 'x' button on the 'main' window of the transaction. Perhaps because this an entry with split items. When I open the split items and select the item in question, In can see the two tag entries listed with an 'x', however I can't delete one or both tags from the item. (see attached screenshot)
Comment 4 Fred 2021-12-08 19:36:50 UTC
Created attachment 144359 [details]
split items with false tag entries.

I can't remove the false tag entries (here: 'men undies'. THe entry 'RBC MC' would be the correct tag but I can't remove either.
Comment 5 Jack 2021-12-09 01:39:46 UTC
Please be a bit more specific about why you can't remove the tag.  What happens when you click on the "X" to the left of "mens undies"?
Comment 6 Thomas Baumgart 2021-12-09 07:41:59 UTC
Try to widen the tag column in the split editor. I agree, it makes a difference if you have a split transaction or a normal one. I tried to duplicate your problem with the latest stable version (5.12.) and have no problems to a) remove the tag from the split and b) delete the tag afterwards. Chances are that the problem has been fixed in the meantime.
Comment 7 Fred 2021-12-09 20:15:40 UTC
(In reply to Jack from comment #5)
> Please be a bit more specific about why you can't remove the tag.  What
> happens when you click on the "X" to the left of "mens undies"?

Hi Jack,
I can't be more specific.
What happens when I click on the 'X" : Nothing.
Comment 8 Fred 2021-12-09 20:23:20 UTC
(In reply to Thomas Baumgart from comment #6)
> Try to widen the tag column in the split editor. I agree, it makes a
> difference if you have a split transaction or a normal one. I tried to
> duplicate your problem with the latest stable version (5.12.) and have no
> problems to a) remove the tag from the split and b) delete the tag
> afterwards. Chances are that the problem has been fixed in the meantime.

Thomas:
I widened the column and when I click on the 'X' it appears that it would delete the false tag entry (see new screenshot) 
However when I confirm the changes (OK button), save the transaction and open it for edit again, it's still there.
Was the bug reported before so that it got fixed?
Thanks
Fred

<New attachment>
Comment 9 Fred 2021-12-09 20:26:25 UTC
Created attachment 144407 [details]
widened tag column after 'X' on false entry

It appears that the false tag entry ('men undies') will be removed from the split transaction through 'X'. However, when confirmed and saved, it's still there - ^confused^
Comment 10 Jack 2021-12-16 21:36:56 UTC
You didn't widen the column enough.  If you make it even wider, the X for men's undies should appear, where currently only the X for RBC MC is showing.  The down arrow lets you select additional tags.  The text to the left of that just shows the currently selected tags.  Each selected tag should appear with an X, but to the right of the down arrow.
Comment 11 Fred 2021-12-18 17:51:12 UTC
(In reply to Jack from comment #10)
> You didn't widen the column enough.  If you make it even wider, the X for
> men's undies should appear, where currently only the X for RBC MC is
> showing.  The down arrow lets you select additional tags.  The text to the
> left of that just shows the currently selected tags.  Each selected tag
> should appear with an X, but to the right of the down arrow.

Jack,

I apologize that this becomes a long winding threat, but the fact is, I widened the column wide enough, you can see both tags with the accompanying 'x'. When hitting the 'mens undies'  entry's 'x', confirm the change with 'ok' and save the whole transaction, nothing is changing in the transaction. For clarity, I upload 2 screenshots, one from v 5.08 and the other one from v 5.1.2-94 (which is even more odd). 
Don't know what else I could test.
Cheers
Fred
Comment 12 Fred 2021-12-18 17:53:15 UTC
Created attachment 144658 [details]
Split transaction, delete flase tag entry, KMM v 5.0.8

the delete 'action button' is visible but has no effect after saving back the whole transaction.
Comment 13 Fred 2021-12-18 17:54:39 UTC
Created attachment 144659 [details]
Split transaction, delete flase tag entry, KMM v 5.1.2-94 - Just as FYI

no action button 'x' on tag of a split transaction visible.
Comment 14 Jack 2021-12-18 18:22:27 UTC
*(&^&^( I wrote a whole reply, but got a "mid-air collision" and closed too quickly before telling it to post anyway. So....
I have been unable to replicate the issue, either with a version compiled from git head of the 5.1 branch, or with the ArtixLinux 5.1.2 version.

First, I hope you meant "thread" instead of "threat." :-)

Second, can you check/confirm all the detailed steps you took?  After hitting the X to remove the tag, you need to click the check to accept the changes to that split.  Then you need to click OK to accept the changes to the transaction.  Just hitting "Enter" will Cancel instead of OK.
If you actually did all that, and the tag is not removed, then can you create a small kmy file that shows the problem?  Since you demonstrate the problem with two different versions, I'd like to see if the problem might be in the data, although I can't think of how that could work.  Specifically, can you create new transactions that demonstrate the problem?  Does it only happen with multiple splits?  (So far, I've only tried with two splits.)
Comment 15 Fred 2021-12-20 22:05:59 UTC
(In reply to Jack from comment #14)
> *(&^&^( I wrote a whole reply, but got a "mid-air collision" and closed too
> quickly before telling it to post anyway. So....
> I have been unable to replicate the issue, either with a version compiled
> from git head of the 5.1 branch, or with the ArtixLinux 5.1.2 version.
> 
> First, I hope you meant "thread" instead of "threat." :-)
> 
> Second, can you check/confirm all the detailed steps you took?  After
> hitting the X to remove the tag, you need to click the check to accept the
> changes to that split.  Then you need to click OK to accept the changes to
> the transaction.  Just hitting "Enter" will Cancel instead of OK.
> If you actually did all that, and the tag is not removed, then can you
> create a small kmy file that shows the problem?  Since you demonstrate the
> problem with two different versions, I'd like to see if the problem might be
> in the data, although I can't think of how that could work.  Specifically,
> can you create new transactions that demonstrate the problem?  Does it only
> happen with multiple splits?  (So far, I've only tried with two splits.)

Jack,

finally the mystery is resolved. 
Previously I DID NOT hit the 'confirm' action button (√) and went straight to 'OK'. 
Somehow I ignored this step. 
Having said that, IMHO, this 't h r e a d'  can now be closed.
Thanks for your patience.

PS: When the a user made changes in the item, perhaps these action button could be more eye-catching, e.g. through a coloured border around them. This way, stupid users, like me, would see better what their have to do ;-)  (nice improvement)
Comment 16 Jack 2021-12-20 22:21:31 UTC
I'm not sure how to make that more obvious in the UI (any other thoughts or suggestions?) but I'll see about emphasizing it in the handbook.

The issue is that if you hit "OK" you are accepting the current state of the entire transaction, but you have not yet accepted the change to that particular split.
Comment 17 Fred 2021-12-20 22:25:22 UTC
(In reply to Jack from comment #16)
> I'm not sure how to make that more obvious in the UI (any other thoughts or
> suggestions?) but I'll see about emphasizing it in the handbook.
> 
> The issue is that if you hit "OK" you are accepting the current state of the
> entire transaction, but you have not yet accepted the change to that
> particular split.

Jack, maybe 'ok' should be disabled until you have confirmed or cancelled the imminent changes.
Fred
Comment 18 Jack 2021-12-20 22:52:44 UTC
I'll wait for one of the developers to chime in - but that does sound reasonable.  Disable OK on accepting a transaction if the split editor is active - thus forcing an explicit accept or reject of any changes to the split before being able to accept changes to the complete transaction.