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

RESOLVED FIXED in Thunderbird 44.0

Status

Thunderbird
Folder and Message Lists
--
minor
RESOLVED FIXED
8 years ago
3 years ago

People

(Reporter: Umang, Assigned: alta88)

Tracking

Thunderbird 44.0

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 3 obsolete attachments)

(Reporter)

Description

8 years ago
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

Comment 2

8 years ago
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.

Comment 3

8 years ago
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.
(Assignee)

Comment 4

3 years ago
Created attachment 8657580 [details] [diff] [review]
selectedMessages.patch

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)

Comment 5

3 years ago
Wow someone is finally fixing this, thanks!
(Assignee)

Updated

3 years ago
Blocks: 323391

Comment 6

3 years ago
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.
(Assignee)

Comment 7

3 years ago
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.
(Assignee)

Comment 8

3 years ago
Created attachment 8663456 [details] [diff] [review]
selectedMessages.patch
Attachment #8657580 - Attachment is obsolete: true
Attachment #8657580 - Flags: review?(mkmelin+mozilla)
Attachment #8663456 - Flags: review?(mkmelin+mozilla)
(Assignee)

Comment 9

3 years ago
Created attachment 8664001 [details] [diff] [review]
selectedMessages.patch

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)
(Assignee)

Comment 10

3 years ago
Created attachment 8664007 [details] [diff] [review]
selectedMessages.patch

meaning this one...
Attachment #8664001 - Attachment is obsolete: true
Attachment #8664001 - Flags: review?(mkmelin+mozilla)
Attachment #8664007 - Flags: review?(mkmelin+mozilla)

Comment 11

3 years ago
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+
(Assignee)

Comment 12

3 years ago
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)

Comment 13

3 years ago
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)
(Assignee)

Comment 14

3 years ago
try looks good.
Keywords: checkin-needed

Comment 15

3 years ago
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

Updated

3 years ago
Status: NEW → RESOLVED
Last Resolved: 3 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.