Closed Bug 544489 Opened 14 years ago Closed 9 years ago

When mails are selected in "Grouped By Sort" mode, group headings are included in "total" count

Categories

(Thunderbird :: Folder and Message Lists, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 44.0

People

(Reporter: umang.me, Assigned: alta88)

References

Details

Attachments

(1 file, 3 obsolete files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1

In "Grouped By Sort" mode, when emails are selected the total doesn't tally properly.

Reproducible: Always

Steps to Reproduce:
1. Group by sort
2. Search for mail from a sender (should have mails in two or three groups)
3. Ctrl+A

Actual Results:  
If there are three mails in three groups, the total is shown as 12 instead of 9, because TB is counting the group heading as an email also.

Expected Results:  
1. I do not expect the group heading to be selectable at all.
2. The "Total" tally should not count the group heading at all.

Using Thunderbird 3, Ubuntu Karmic Koala. Downloaded TB from Ubuntuzilla PPA (which packages Official Mozilla Builds of TB).
Confirming based on Vista x86 (Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.7) Gecko/20100111 Lightning/1.0b2pre Thunderbird/3.0.1 ThunderBrowse/3.2.8.1 ID:20100111101938).
Severity: normal → minor
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Hardware: x86 → All
Version: unspecified → 3.0
Confirming! This is only marginally annoying because I obsess over the total number of messages sitting in my unified inboxes.

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.7) Gecko/20100713 Lightning/1.0b2 Thunderbird/3.1.1

Also happens on the same version of Thunderbird on my Windows 7 Professional machine.
Also even if you aren't selecting items, totals are shown at the bottom of the Thunderbird window. This total seems to show correctly on individual inboxes/folders but for unified views thats when the totals seem incorrect.
Attached patch selectedMessages.patch (obsolete) — Splinter Review
Always use folderDisplay.selectedMessages to get the real message count, and not any treeview derived row count.
Assignee: nobody → alta88
Attachment #8657580 - Flags: review?(mkmelin+mozilla)
Wow someone is finally fixing this, thanks!
Blocks: 323391
Comment on attachment 8657580 [details] [diff] [review]
selectedMessages.patch

Review of attachment 8657580 [details] [diff] [review]:
-----------------------------------------------------------------

What do you think about instead making gFolderDisplay.selectedCount work as intended?
It would be good to decrease usage of global functions like GetNumSelectedMessages instead of increasing it.
Yes, that would surely be better; it's never clear how much refactoring should be done, even in clear cases like this.  The function itself can't be killed due to a few mailnews/ uses, but will be removed everywhere else.
Attached patch selectedMessages.patch (obsolete) — Splinter Review
Attachment #8657580 - Attachment is obsolete: true
Attachment #8657580 - Flags: review?(mkmelin+mozilla)
Attachment #8663456 - Flags: review?(mkmelin+mozilla)
Attached patch selectedMessages.patch (obsolete) — Splinter Review
unbitrot.  this patch should be done before the 2 in bug 1192838.
Attachment #8663456 - Attachment is obsolete: true
Attachment #8663456 - Flags: review?(mkmelin+mozilla)
Attachment #8664001 - Flags: review?(mkmelin+mozilla)
meaning this one...
Attachment #8664001 - Attachment is obsolete: true
Attachment #8664001 - Flags: review?(mkmelin+mozilla)
Attachment #8664007 - Flags: review?(mkmelin+mozilla)
Comment on attachment 8664007 [details] [diff] [review]
selectedMessages.patch

Review of attachment 8664007 [details] [diff] [review]:
-----------------------------------------------------------------

Great! r=mkmelin
Please have it sent to try if you haven't already
Attachment #8664007 - Flags: review?(mkmelin+mozilla) → review+
there are no mozmill errors locally.  anyway, is there a procedure to request try?  is push-needed used or watched?  otherwise, i'll ask you for the try.. ;)
Flags: needinfo?(mkmelin+mozilla)
No real procedure AFAIK, but if you'd like access to try, file a bug for permissions.

https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=95f65a06f86f
Flags: needinfo?(mkmelin+mozilla)
try looks good.
Keywords: checkin-needed
https://hg.mozilla.org/comm-central/rev/c11a88082846ec6ab926d36586e684600c3812b7
Bug 544489 - When mails are selected in "Grouped By Sort" mode, group headings are included in "total" count. r=mkmelin
Status: NEW → RESOLVED
Closed: 9 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 44.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: