Bug 300898 - Tags doesn't work
Summary: Tags doesn't work
Status: RESOLVED WORKSFORME
Alias: None
Product: kontact
Classification: Applications
Component: mail (show other bugs)
Version: 4.8.x
Platform: Fedora RPMs Linux
: NOR major
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-30 22:50 UTC by Sylvia
Modified: 2016-11-03 14:35 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
show custom tag icons in the messagelist (747 bytes, patch)
2013-10-30 20:51 UTC, luisfe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sylvia 2012-05-30 22:50:56 UTC
Example:  Set 2 tags with different colours and diferent icons.  Then, mark an email with one of the tags.  Anything changes, normal colour, no icon.  Back to settings, press Apply button  (for second time)  and back to mails.  Wow!  There are my colour, but no icon.
This happen everytime Kontact or Kmail is open, and everytime an email is marked with some tag, and everytime that a tag is added.

Reproducible: Always

Steps to Reproduce:
1. Add a tag and configure it.  Press Apply button
2. Tag any email.
3. Back to settings, apply again.
4. Back to emails, tag it again.  See if it works.
Actual Results:  
Tags settings are not applied.  Once and again I have to go to settings and press Apply button to see them work.

Expected Results:  
If the tag  "Friends"  is green and have an star as icon, the mails tagged as "Friends" have to be shown all green and with a little star in the icons area.  

It happens in Fedora 16 and 17, with 32-bits and 64-bits, under KDE, Gnome 3 and Cinnamon.
Comment 1 tprotopopescu 2012-07-14 22:06:50 UTC
I see the same problem with openSUSE 12.2 Release Candidate 1, KDE 4.8.4. 

When I create a new tag, the icon for that tag is never saved. (i.e. go to Configure Kontact > Appearance > Message Tags. Create a new tag with an icon. Hit apply and ok; then go back to the configuration dialog, and the icon has not been saved to the tag.)

When applying the tag to a message, either through the menu or a keyboard shortcut, the following happens: the appearance of the message does not change. If you change view to a different folder, and then go back to the folder with the message the tag was applied to, the appearance of the message will have changed in conformity with the color of the tag (but no icon).
Comment 2 Ryan Volz 2012-09-27 07:51:48 UTC
I have the same problems running Gentoo with KMail 4.8.5.

1) Setting a text color for a tag works inconsistently. Creating many new tags all at once, only the text color for the last-edited tag is remembered. This can be worked around by clicking 'Apply' immediately after setting the text color for a tag, in which case all of those colors are remembered. Changing a text color only works after multiple tries (before it works, the color is set to none), and I haven't figured out a pattern yet for that. 
2) I am unable to set an icon for a tag. No matter what I try, the tag always reverts to no icon.
3) When applying a tag to an email, it is necessary to switch to another folder and back (triggering a metadata refresh?) in order for the tag's text color to take effect.
4) Multiple times in setting up my tags, multiple (2, 3, and I think 8 once) blank, nameless tags would appear in the list when returning to a newly-opened 'Message Tags' tab to change settings or add new tags. These blank tags would subsequently appear as options in other applications such as Dolphin, but with a name consisting of a random string of characters. I searched my files for one of these strings, and curiously it appeared as a tag identifier in my old (KMail1) kmailrc. Thinking the old settings were somehow being loaded and confusing KMail2, I renamed kmailrc to something else. Since then, I have not had any blank tags appear.

Perhaps some of these observations can help in tracking down these bugs.
Comment 3 Myriam Schweingruber 2012-09-29 13:26:05 UTC
Confirmed by other reporters.

@all: could you please upgrade to KDE 4.9.1 and try again?
Comment 4 tprotopopescu 2012-09-30 14:32:31 UTC
With 4.9.1: 
1) still persists - if creating multiple tags only the color of the last created one is saved. 

2) still persists - icons for tags do not get saved. 

3) is fixed - the tag (minus the icon) gets applied without having to switch to another folder. 

4) I never noticed this problem - but I do see tags in the list from kaddressbook and from korganizer.
Comment 5 luisfe 2013-10-30 20:51:15 UTC
Created attachment 83234 [details]
show custom tag icons in the messagelist

With this patch (tested against kde 4.11.2) custom assigned icons appear in the messagelist view.
Comment 6 Allen Winter 2013-10-30 22:18:37 UTC
luisfe,

Would you be able to post this patch on reviewboard.kde.org please?

looks ok to me but I want to make sure the nepomuk experts see it first.
Comment 7 Laurent Montel 2013-10-31 06:21:56 UTC
Git commit 38d23ac4515062ad8a83f6a322b3518eefdb4931 by Montel Laurent.
Committed on 31/10/2013 at 06:21.
Pushed by mlaurent into branch 'KDE/4.11'.

Apply patch from luisfe for fixing icon in messagelist

Will investigate others problems

M  +2    -2    messagelist/core/messageitem.cpp

http://commits.kde.org/kdepim/38d23ac4515062ad8a83f6a322b3518eefdb4931
Comment 8 Laurent Montel 2013-10-31 06:28:01 UTC
4) it's normal we see all tags. We can't select type of tag.
Comment 9 Laurent Montel 2013-10-31 06:29:02 UTC
' When applying the tag to a message, either through the menu or a keyboard shortcut, the following happens: the appearance of the message does not change. If you change view to a different folder, and then go back to the folder with the message the tag was applied to, the appearance of the message will have changed in conformity with the color of the tag (but no icon).'
It's not apply directly.
Need investigate.
Comment 10 tprotopopescu 2013-10-31 14:23:43 UTC
' When applying the tag to a message, either through the menu or a keyboard shortcut, the following happens: the appearance of the message does not change. If you change view to a different folder, and then go back to the folder with the message the tag was applied to, the appearance of the message will have changed in conformity with the color of the tag (but no icon).'

I found this part of the problem fixed after upgrading to KDE 4.9.1 (after comment 3 above). The problem was that if you defined a tag which both applied and icon and changed the text color then applying the tag did neither immediately, but if you changed folder and came back to the folder where you applied the tag then the color of the message(s) would have changed but there would be no icon in the 'tag' column. 

The color issue has been fixed (this problem 3 from comment 2). Additionally problem 1 is also fixed as far as I can see. When defining a tag with an icon the icon is saved but it still does not appear when the tag is applied.
Comment 11 tprotopopescu 2013-10-31 14:25:46 UTC
I should add this is in kmail 4.11.2.
Comment 12 Denis Kurz 2016-09-24 19:32:59 UTC
This bug has only been reported for versions before 4.14, which have been unsupported for at least two years now. Can anyone tell if this bug still present?

If noone confirms this bug for a Framework-based version of kontact (version 5.0 or later, as part of KDE Applications 15.08 or later), it gets closed in about three months.
Comment 13 luisfe 2016-10-31 18:49:01 UTC
Patch in #7 was applied and tag icons appear correctly.

If one sets a background color in a tag, sometimes, one needs to change folders after the configuration before the background color applies, but not always! I am not sure why. Tested with kmail 5.2.3 debian packages (pre qtwebengine).

Also, if a message has several tags and one configures different tag with different background/foreground colors, only one is applied. This is normal since one cannot apply different background color to the same message, but it is not clear which tag is "dominant". This may have unexpected results. If a mail has several tags and only one is configured for background color, this background color may not appear, since an unconfigured tag may be "dominant".
Comment 14 Denis Kurz 2016-11-03 14:35:56 UTC
Thanks for your feedback, luisfe. The remaining bugs you describe are already reported, so I close here.