Bug 183004 - Kmail's threaded view sometimes not sorted correclty
Summary: Kmail's threaded view sometimes not sorted correclty
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: new message list (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-03 15:03 UTC by Roland Leißa
Modified: 2011-12-26 17:29 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
three screenshots of different sorting (142.82 KB, image/jpeg)
2009-02-03 15:07 UTC, Roland Leißa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roland Leißa 2009-02-03 15:03:58 UTC
Version:            (using KDE 4.2.0)
OS:                Linux
Installed from:    Gentoo Packages

First of all: The new threaded view is awesome.
However there seems to be a subtle bug somewhere in the sorting/aggregation code. Have a look a the screenshot (actually three screenshots). It seems to be absolutely random whether those seven red marked mails are sorted in to one, two or even more threads. I just click on another mail-folder and go back to the original one to find a different sorting. 

My guess is that a presorting is done and then another sorting is done which is not a stable sorting algorithm (perhaps quicksort based, that would explain the random behavior).
Comment 1 Roland Leißa 2009-02-03 15:07:21 UTC
Created attachment 30911 [details]
three screenshots of different sorting

Sometimes I get all seven mails in one thread. I didn't include that screenshot. This is variant I prefer.
Comment 2 Roland Leißa 2009-02-03 15:13:26 UTC
Oh my settings:
Sorting: 
- by date/time of most recent in sub tree
- most recent on top
- descending

aggregation:
- Current activity, threaded
Comment 3 Roland Leißa 2010-01-24 14:18:12 UTC
still valid in KDE 4.4 RC 1
Comment 4 Bernd Oliver Sünderhauf 2011-12-21 01:08:25 UTC
Hi Roland,
we need more information in order to reproduce your bug.
While there are certainly several bugs left in the threading mechanism, it is quite hard to figure out in which specific scenarios threading behaves the way you describe.

Some aspects we can infer from your screenshots are:
1. you're keeping your sent mail in one folder together with incoming mail.
2. your answers are always correctly subordinated to the respective incoming messages 
3. it's only the incoming answers that seem to be randomly subordinated to their predecessor (or not).

Some aspects we'd need to know:
1. Firstly, does the bug still exist in KDE 4.7?
2. Then, does this happen regularly with your threads or only with this specific set of mails?
3. Could you please check in the details of "Current activity, threaded" setting whether mails are threaded by exact match only, or exact/references, or exact/references/subject?
4. Do the incoming mails in this thread have "In-Reply-To" and "References" headers or not?
5. Does the bug happen only with incoming mails that are missing "In-Reply-To" and "References" headers?
6. Are the subjects of the answers just a "Re: " + the last subject?

Sorry, if this takes some of your time, but it would be very helpful for tracking the bug down.
THX, Pancho
Comment 5 Roland Leißa 2011-12-26 17:29:01 UTC
Hi Bernd,

I'm currently not using the threaded view anymore (as I'm preferring a flat view). However, I played a bit with the threaded view again and I didn't noticed any problems. So I guess you can mark it as fixed.