Bug 420114 - Tag assigned to transactions cannot be deleted only re-assigned
Summary: Tag assigned to transactions cannot be deleted only re-assigned
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: 5.0.7
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-15 12:26 UTC by schoenes-rad
Modified: 2024-08-17 20:33 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.1.0
Sentry Crash Report:


Attachments
saubererstrom.jpg (5.11 KB, image/jpeg)
2020-04-15 21:17 UTC, schoenes-rad
Details

Note You need to log in before you can comment on or make changes to this bug.
Description schoenes-rad 2020-04-15 12:26:17 UTC
SUMMARY
I would like to be able to remove cue entries from all or part of all affected line items.  The current mechanism only allows for the reassignment of affected line items to a different cue entry.

STEPS TO REPRODUCE
1. Select CUEs
2. Select any previously created cue entry.  Assigned line items appear in the right-hand side split window.
3. Clicking on DELETE will not allow for actual deletion of cue unless affected line items will be reassigned to a different cue.

OBSERVED RESULT
Cue cannot be deleted without reassignment of line items.

EXPECTED RESULT
After selecting all or part of affected line items, the software should allow for the de-assignment of the selected cue.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Fedora 31/GNOME Version 3.34.5
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: KDE Frameworks 5.68.0
Qt Version: Qt 5.13.2 (kompiliert gegen 5.13.2)

ADDITIONAL INFORMATION
Comment 1 Thomas Baumgart 2020-04-15 18:13:51 UTC
What do you refer to as 'cue or cue entry'? What is the German word for it?
Comment 2 schoenes-rad 2020-04-15 21:17:41 UTC
Created attachment 127586 [details]
saubererstrom.jpg

Thomas:
Sorry for the confusion - it's TAG, of course, not CUE.  Same word in
German ("Stichwort"), but of course two totally different items in
English.  Incorrect re-translation on my side.
On Wed, 2020-04-15 at 18:13 +0000, Thomas Baumgart wrote:
> https://bugs.kde.org/show_bug.cgi?id=420114
> 
> Thomas Baumgart <tbaumgart@kde.org> changed:
>            What    |Removed                     |Added---------------
> -----------------------------------------------------------
> --         Resolution|
> -
> --                         |WAITINGFORINFO             Status|REPORTE
> D                    |NEEDSINFO
> --- Comment #1 from Thomas Baumgart <tbaumgart@kde.org> ---What do
> you refer to as 'cue or cue entry'? What is the German word for it?
Comment 3 Thomas Baumgart 2020-04-16 18:55:46 UTC
I rephrase the problem here so that we understand it a bit better: in the tag view it is not possible to delete a tag. Only tags without transactions assigned can be deleted.

I am actually not sure why that limitation exists. Either there is a reason or it can be removed. We need to investigate this.
Comment 4 Jack 2020-04-16 19:15:06 UTC
I think the issue is the same as for categories.  You can't delete a tag if there are any transactions using that tag, because they would be left with invalid references.  So, the system offers to reassign those transactions to a different tag.  Perhaps this bug could be a wishlist to ask if the user wants to simply remove that tag from all transactions instead of assigning them to a different tag.  That can't be done for a Category, since we (generally) don't allow transactions without a category, but it should be possible for Tags.  However, an alternative would be some reasonable way to find all transactions with a tag, and then remove that tag from them prior to deleting the tag itself.
Comment 5 Thomas Baumgart 2022-01-05 20:48:34 UTC
Git commit 5a04e6286adcee81fbe84497a0ce397b3df97f5a by Thomas Baumgart.
Committed on 05/01/2022 at 20:48.
Pushed by tbaumgart into branch 'master'.

Allow completely deleting tags without prior reassignment
GUI:

M  +42   -24   kmymoney/dialogs/ktagreassigndlg.cpp
M  +21   -12   kmymoney/dialogs/ktagreassigndlg.h
M  +84   -25   kmymoney/dialogs/ktagreassigndlg.ui
M  +61   -45   kmymoney/views/ktagsview.cpp

https://invent.kde.org/office/kmymoney/commit/5a04e6286adcee81fbe84497a0ce397b3df97f5a