Closed Bug 1909617 Opened 4 months ago Closed 3 months ago

"Mark Folder Read" on a Saved Search folder, results in all the emails in the folders it's based on becoming read

Categories

(Thunderbird :: Folder and Message Lists, defect)

Thunderbird 115
defect

Tracking

(thunderbird_esr115 affected, thunderbird_esr128? fixed, thunderbird129 affected)

RESOLVED FIXED
131 Branch
Tracking Status
thunderbird_esr115 --- affected
thunderbird_esr128 ? fixed
thunderbird129 --- affected

People

(Reporter: dale303w, Assigned: welpy-cw)

References

(Regression)

Details

(Keywords: regression, triaged, Whiteboard: [datalossy])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0

Steps to reproduce:

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Thunderbird/128.0.1 (although it happened in previous versions too so not newly introduced.)

Create a search folder based on an existing folder. (eg inbox)
Enter some criteria that selects a handful of emails regularly. (eg. from a specific domain)
Wait until the folder starts to fill up with unread messages in both the inbox and the search folder. Ensure there are more unread messages in the inbox than the search folder.
Right click the search folder and select "Mark Folder Read"

Actual results:

Messages in the Search folder become read but so do all All of the unread messages in the Inbox become read.

Expected results:

Only the messages in the Search Folder should have become read.

Hello,

I have managed to reproduce this issue with TB 115.13.0(20240715172621), 128.0esr(20240703144221), 129.0b1(20240708223515), 130.0a1(20240709104114) with the steps above using macOS 14.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Component: Untriaged → Folder and Message Lists

This happens with imap but there's a workaround: Select all the messages in the search folder (ctrl-a), right click any message and then choose Mark->As Read. Don't choose Mark->All Read.

I also checked with Local Folders and it's worse. When you make a search folder from a folder that has all it's messages marked unread (bold), the search folder message(s) are read (not bold). Then when you select the search folder, all the unread messages in the original folder get set to read (not bold).
Note: My Local Folders are in Maildir format so that might be causing it, not sure.

Then I tried it on a pop3 folder in Mbox format. See the same problem as with imap and I don't see the issue with Local Folder/Maildir.

Finally, I tried this on an imap account running on an old laptop that still has tb 68 running. It works fine with that on imap (only tried imap on 68). However, 68 had no "Mark Folder Read" selection and only a selection on message right-click Mark->All Read. Unlike with current TB, doing Mark->All Read on a search folder only affects the messages in the search folder and not ALL the messages in the original folder.

So based on this, the bug appears to be a regression.

Edit: Tried the STR on a Local Folder that is using Mbox. I see the same results as with IMAP and POP3. So the instant marking as read that I saw with Local Folders/Maildir must be due to maildir.

Does this issue exist prior to daily 2023-01-16?
If not, it is a regression caused by supernova.

Severity: -- → S3
Flags: needinfo?(ramona)
Keywords: regression
Whiteboard: [datalossy]
Version: Thunderbird 128 → Thunderbird 115

Hello Wayne,

I have managed to find a regression range

It seems the last good build was from 2023-10-31 and first bad build was from 2023-11-01

I believe the culprit is bug 1842420

Regressed by: 1842420
See Also: → 1894214
Flags: needinfo?(alessandro)
Keywords: triaged

Without a view, there seems to be no reasonable way to mark as read only the searched messages in
the underlying folders. So I suggest this approach. The functionality is still provided by the
"Mark All Read" command when the folder is displayed (which should be fixed in bug 1909617).

Assignee: nobody → h.w.forms
Status: NEW → ASSIGNED

(In reply to Ramona Gavrilescu from comment #4)

Hello Wayne,

I have managed to find a regression range

It seems the last good build was from 2023-10-31 and first bad build was from 2023-11-01

I believe the culprit is bug 1842420

Thank you so much for confirming and finding a regression.

Based on this it seems that this is a new feature that we didn't have prior to 121.
As Hartmut suggested, I think it's better to not show the "Mark All Read" menuitem for virtual folders with search terms because those don't really generate a "view" where messages are attached to so we don't have a real Database View to mark all those messages as read.

The workaround of "CTRL+A to select -> Right click -> Mark as Read" I think it's a safe approach.
We will need to rebuild virtual folders later next year with the new global database, so we might be able to add this functionality later on.

Flags: needinfo?(ramona)
Flags: needinfo?(alessandro)

If this happens on a saved search, it likely also happens on Unified Folder?

Summary: "Mark Folder Read" on a Search folder, results in all the emails in the folders it's based on becoming read → "Mark Folder Read" on a Saved Search folder, results in all the emails in the folders it's based on becoming read

As long as there are no additional search terms set via the unified folder's properties, the command works as expected. So not likely in my opinion.

Target Milestone: --- → 131 Branch

Pushed by brendan@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/67d373e13995
Don't show "Mark Folder Read" for virtual folders with search terms. r=aleca

Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED

Comment on attachment 9417612 [details]
Bug 1909617 - Don't show "Mark Folder Read" for virtual folders with search terms. r=#thunderbird-reviewers

[Approval Request Comment]
Regression caused by (bug #): bug 1842420
User impact if declined: Messages not included in the virtual folder may be marked read in the underlying real folder.
Testing completed (on c-c, etc.): c-c and beta
Risk to taking this patch (and alternatives if risky): very low

Attachment #9417612 - Flags: approval-comm-esr128?

Comment on attachment 9417612 [details]
Bug 1909617 - Don't show "Mark Folder Read" for virtual folders with search terms. r=#thunderbird-reviewers

[Triage Comment]
Approved for esr128

Attachment #9417612 - Flags: approval-comm-esr128? → approval-comm-esr128+
See Also: → 1930993
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: