Closed Bug 1481460 Opened 6 years ago Closed 4 years ago

when less than 501 messages are selected and mail.operate_on_msgs_in_collapsed_threads is true, «Note: XXX messages are selected, the first 500 are shown» shouldn’t be displayed if XXX <= 500

Categories

(Thunderbird :: Mail Window Front End, defect)

defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 78.0

People

(Reporter: aria, Assigned: aria)

Details

(Keywords: good-first-bug)

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0
Build ID: 20180803111934

Steps to reproduce:

With Thunderbird 52.9.1, I selected all (292) messages in a folder.


Actual results:

I got the message:

> These messages take up 6.3 MB. (Note: 292 messages are selected, the first 500 are shown)


Expected results:

It feels weird to display this text when the number of messages is under 500.

It should not have displayed «the first 500 are shown».
Severity: normal → trivial
Summary: «Note: XXX messages are selected, the first 500 are shown» when XXX < 500 → when less than 501 messages are selected and mail.operate_on_msgs_in_collapsed_threads is true, then "the first 500 are shown" should not be part of «Note: XXX messages are selected, the first 500 are shown»
Whiteboard: [good-first-bug]
This should be NEW instead of UNCONFIRMED, right?
Keywords: good-first-bug
Whiteboard: [good-first-bug]
Summary: when less than 501 messages are selected and mail.operate_on_msgs_in_collapsed_threads is true, then "the first 500 are shown" should not be part of «Note: XXX messages are selected, the first 500 are shown» → when less than 501 messages are selected and mail.operate_on_msgs_in_collapsed_threads is true, «Note: XXX messages are selected, the first 500 are shown» shouldn’t be displayed if XXX <= 500
Version: 52 Branch → 68

So I checked what the bug actually was.

It seems that the code to summarize the multi-selection view was copied from the code to summarize a thread. But in the second case, it checks both for the limit of 500 messages and the limit of 100 threads.

It displays the same notice in both cases, so in «Note: XXX messages are selected, the first 500 are shown», XXX is always the number of messages. So when you select more than 100 threads but less than 500 messages, the notice will be displayed with inconsistent numbers.

See here for the code I talk about:
https://dxr.mozilla.org/comm-central/rev/2a29ee0adb310b54a6a2df72034953fed8f2b043/comm/mail/base/content/multimessageview.js#625-626,643-646

So the real problem is more that the notice is plainly incorrect in these cases, I edited the bug’s title to reflect that.

Assignee: nobody → perso

needs a reviewer

Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

Ariasuni, you should add a reviewer to get this bug further. :mkmelin could be a candidate.

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Flags: needinfo?(perso)
Resolution: --- → FIXED

I added the reviewer you mentioned. Should the bug not be closed until the patch is merged, though?

Flags: needinfo?(perso)

(In reply to ariasuni from comment #6)

Should the bug not be closed until the patch is merged, though?

No, the bug will be closed when the patch lands.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → ASSIGNED
Target Milestone: --- → Thunderbird 78.0

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/7cd276439a22
Fix notice saying more messages are displayed than selected. r=Paenglab

Status: ASSIGNED → RESOLVED
Closed: 4 years ago4 years ago
Resolution: --- → FIXED
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/4c63520cf276
follow-up - Fix not-defined variable. rs=linting DONTBUILD
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: