Bug 160157 - Cannot set tags correctly on multiple file selection.
Summary: Cannot set tags correctly on multiple file selection.
Status: RESOLVED FIXED
Alias: None
Product: nepomuk
Classification: Unclassified
Component: general (show other bugs)
Version: 4.9
Platform: Compiled Sources Linux
: NOR normal with 24 votes (vote)
Target Milestone: ---
Assignee: Nepomuk Bugs Coordination
URL:
Keywords:
: 251728 273652 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-03-31 14:21 UTC by FiNeX
Modified: 2012-12-31 13:38 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.11


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description FiNeX 2008-03-31 14:21:44 UTC
Version:           Revision: 791773 (using Devel)
Installed from:    Compiled sources
OS:                Linux

How to reproduce the bug:

1) select more than one file 
2) apply one tag to the selected files
Result; only one file from the selection is tagged instead of all.
Comment 1 Peter Penz 2008-03-31 21:00:35 UTC
Added Sebastian to CC, should be only a minor issue...
Comment 2 Sebastian Trueg 2008-04-01 14:27:33 UTC
SVN commit 792518 by trueg:

Implemented tagging of multiple files at the same time.
The result is always an intersection of the tags of all files.
Another possibility would be to only change the clicked tag. Feedback?

BUG: 160157


 M  +1 -1      metadatawidget.cpp  
 M  +45 -6     tagcloud/resourcetaggingwidget.cpp  
 M  +1 -0      tagcloud/resourcetaggingwidget.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=792518
Comment 3 FiNeX 2008-04-01 19:15:55 UTC
Sebastian, let me some time to test it. Thanks.
Comment 4 FiNeX 2008-04-03 10:49:49 UTC
Well, suppose to have 3 tagged files like:
- File1 (holidays, lake)
- File2 (friends)
- File3 (work, lake)

A possible usecase is that the user want to ADD a new tag (for example: "happy") to the 3 files.

If you set the intersection on the tags, you will lost all the existing tags: 
(holidays, lake, happy) AND (friends, happy) AND (work, lake, happy) => (happy)

Another usecase: the user select the three files (File1, File2, File3). On the sidebar there are displayed only the tags from the intersection.
But why not the union of the tags? Because I don't know to what file a tag is assigned? Maybe a solution could be to color in black the tags which are on the intersection and gray ot the tags which aren't.
In this way the user can remove a tag from a lot of files easily, even if the tags assigned are not the same on all the files selected.

What do you think?

(I've reopened the bug for this thoughts)
Comment 5 Sebastian Trueg 2010-02-25 17:03:02 UTC
I like your approach. Now we onyl need somebody to implement it. :P
But seriously, I think this should be fixed. Don't know if I find the time to do it, though.
Comment 6 Monkey D Luffy 2010-05-16 23:51:18 UTC
Would it also be possible to show the number of files with each tag?

In the example given above:
- File1 (holidays, lake, happy)
- File2 (friends, happy)
- File3 (work, lake, happy)


The selection of these files would show on the sidebar sorted alphabetically (or by number count):
friends (1)
happy (3)
holidays (1)
lake (2)
work (1)

With happy in black and the other tags in gray.
Comment 7 Kolia 2010-09-08 02:22:51 UTC
Sebastian could you give some clues on the way to do it in case someone would find some time to implement it? :p

Not having a reliable way to tag multiple files (due to the "intersection" problem) is kinda frustrating especially now that the search in dolphin makes it really interesting to use!
Comment 8 Mark 2010-09-19 02:52:34 UTC
Is this still a bug? Since i can't find tagging capabilities in dolphin anymore in the latest stable version nor trunk...
Comment 9 FiNeX 2010-09-19 18:37:26 UTC
*** Bug 251728 has been marked as a duplicate of this bug. ***
Comment 10 Kolia 2010-09-19 22:13:00 UTC
Mark, it won`t help you much, but: tagging is working here (kde 4,5,2 and recent trunk too).
Comment 11 Matthias Fuchs 2011-05-29 00:30:55 UTC
*** Bug 273652 has been marked as a duplicate of this bug. ***
Comment 12 Jeroen van Meeuwen (Kolab Systems) 2012-08-24 16:19:32 UTC
Resetting assignee to default as per bug #305719
Comment 13 Bryan Cuneo 2012-10-26 02:16:54 UTC
[Part of the Dolphin Bug Weeks 2012]
The original issue (tags not being applied to all files) was apparently fixed by SC 4.5.2 (maybe earlier). I can confirm that it has not reappeared in Dolphin 2.1/KDE SC 4.9.2 (Kubuntu packages). The tag intersection issue does still exist, though. Not sure if that should be a put into a new report or not.
Comment 14 Frank Reininghaus 2012-10-30 06:44:35 UTC
Reassigning to Nepomuk - the meta data widget isn't part of Dolphin any more, and Vishesh is working on a new implementation inside one of Nepomuk's repositories. Vishesh: Note that the issue which is still buggy is in comment 4.
Comment 15 Vishesh Handa 2012-12-31 07:23:58 UTC
Git commit 1e3eb42e29571e002f5c09cc81b7beea0121a0d3 by Vishesh Handa.
Committed on 30/12/2012 at 20:47.
Pushed by vhanda into branch 'KDE/4.10'.

WidgetFactory: Properly handle multiple file tagging

When multiple files have been selected then setProperty should not be
used, as the tag widget will only show the common tags, and changing
that list of common tags will result in the not-common tags being
removed.

Instead, we use addProperty to add the changed tags. This way the old
tags are preserved. Additionally, we maintain a list of the previous
tags, and calculate the difference to remove the previous tags.
FIXED-IN: 4.11

M  +21   -3    ui/widgetfactory.cpp
M  +1    -0    ui/widgetfactory.h

http://commits.kde.org/nepomuk-widgets/1e3eb42e29571e002f5c09cc81b7beea0121a0d3
Comment 16 Vishesh Handa 2012-12-31 07:26:33 UTC
The "FIXED-IN: 4.11" is not a typo. 

I'll see if I can fix this in 4.10, it's not going to be easy.
Comment 17 Christoph Feck 2012-12-31 13:31:51 UTC
...but you pushed it to the 4.10 branch.
Comment 18 Vishesh Handa 2012-12-31 13:38:16 UTC
(In reply to comment #17)
> ...but you pushed it to the 4.10 branch.

I know. But that code isn't used in Dolphin for 4.10. I delayed it too much. The release team is contemplating certain measures like delaying the release and having another RC. Lets see what happens.

I will try to fix this in the old-code as well, but I cannot guarantee that it will make it into 4.10, maybe 4.10.1