Bug 302186 - Wish: Remove or add mail's reference header to change thread grouping of messages
Summary: Wish: Remove or add mail's reference header to change thread grouping of mess...
Alias: None
Product: kmail2
Classification: Applications
Component: message list (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR wishlist (vote)
Target Milestone: ---
Assignee: kdepim bugs
Depends on:
Reported: 2012-06-19 13:52 UTC by Björn Hendriks
Modified: 2016-11-10 10:27 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description Björn Hendriks 2012-06-19 13:52:03 UTC
KMail has the nice feature to aggregate messages by thread. As far as I can see this is mainly done by the "References:" header of the mails.

Unfortunately, it happens every now and then that unexperienced mailing list users start a new discussion thread by answering to an existing mail. This inserts a wrong reference to another thread and, of course, KMail appends the offending mail to that thread. Less often -- to my experience -- it happens vice versa, i. e., a user continues a thread without answering, so the correct reference gets lost and KMail shows that message as start of a new thread.

It would be nice to have a context menu item to locally correct the broken thread grouping in both cases. The easier one would probably be a menu item "ungroup" which removes the wrong "References:" header and moves the message to be a new thread head.

Less important -- but also nice -- would be a "group" menu item which offers to select another message, inserts that as (additional) reference message and moves the message accordingly.

Reproducible: Always

Steps to Reproduce:
1. Choose a well populated message list
2. Configure it to be grouped by thread (seems to be standard if not changed)
3. View all headers of a message not at head of thread and see "References:" header
Actual Results:  
"References:" contains one or several message-IDs of messages further up the thread or none if message is head of thread.

Expected Results:  
See details

This wish is about my KMail 1.13.7 of my up-to-date Debian Testing installation. Please ignore if KMail2 has already such a feature. The report interface didn't offer to select kmail1.
Comment 1 Björn Hendriks 2012-07-02 10:21:57 UTC
Thanks to a start-up tip I found out that you can set up special filter actions to add, remove, or modify mail header entries. So, I added a filter to remove the "References" header which could be triggered by menu or toolbar item.

Applying that filter to a message with wrong references actually removed the header as expected. But, the mail remained at its place within the thread even after restarting KMail. During restart I made sure no kmail-related process kept running.

Even worse, when I tried to undo the filter action it made KMail crash. After restart nothing was changed. The header was still not there, but the mail still kept its position within the thread.

These results led to more details of this feature wish:
 * Don't crash on undoing a remove header filter (or don't offer that)
 * Update the mail thread relations on change of headers
 * Offer a recursive change of the reference headers, such that all subsequent thread messages keep their reference to the changed message. AFAICS this could not be achieved with the current filter actions.

Should I make separate reports of the crash and/or the missing mail thread update?