News: posts to ignored threads decrease unread count for newsgroup

VERIFIED FIXED

Status

MailNews Core
Database
VERIFIED FIXED
15 years ago
9 years ago

People

(Reporter: Adam Macznik, Assigned: Bienvenu)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

885 bytes, patch
Cavin Song
: review+
(not reading, please use seth@sspitzer.org instead)
: superreview+
Details | Diff | Splinter Review
1.75 KB, patch
Cavin Song
: review+
(not reading, please use seth@sspitzer.org instead)
: superreview+
Details | Diff | Splinter Review
(Reporter)

Description

15 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.0rc2) Gecko/20020510
BuildID:    2002051009 - 1.0 RC2

If you have some ignored threads and new posts arrive to them, the _newsgroup_
unread count is decreased twice.

Reproducible: Always
Steps to Reproduce:
1.Subscribe to some test newsgroup.
2.Download some headers and leave them unread.
3.Mark some thread as ignored (or killed). Let's say after that your newsgroup
name shows 490 unread messages.
4.Send a reply to ignored thread.
5.Get messages.

Actual Results:  Unread count on the newsgroup is decreased by the number of
messages incoming into killed threads. In the example, you would now see 489 as
unread count next to the group name.

Expected Results:  You should still see unread count of 490 (as long as noone
else posted at the same time).

To clarify, if you posted 2 messages, unread count would change from 490 to 488.
Killed messages are "subtracted" from unread count twice, while they should be
subtracted only once to leave the unread count in the scenario intact.

Updated

15 years ago
QA Contact: gayatri → laurel
(Assignee)

Comment 1

15 years ago
confirming.
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Reporter)

Updated

15 years ago
Blocks: 71728
(Reporter)

Comment 2

15 years ago
Since the news filters are now available (thanks Seth :) ), I've noticed this
bug is caused by filters, too.

But moreover - it's present in mail too! (POP, haven't tested IMAP).
Follow these steps:
1. Set up a filter on your mail account to 'mark as read' when 'subject is "test"'
2. Go to your inbox and mark some messages unread.
3. Send a message to yourself with subjest "test".
4. Receive the message and see that your unread count on Inbox goes down by 1.
(Assignee)

Comment 3

15 years ago
I'll look into it. I assume you mean the count goes down twice? Messages added
to ignored threads are marked read - that's actually desired behaviour.
(Assignee)

Comment 4

15 years ago
the unread count for the thread is also decremented incorrectly. I think I have
a fix upcoming for the ignored thread problem. The fix for the mark read filter
will be different, but similar, I think.
(Assignee)

Comment 5

15 years ago
Created attachment 106404 [details] [diff] [review]
proposed fix for msgs added to ignored threads

this fixes the original problem. Still working on the filter action problem.
(Assignee)

Comment 6

15 years ago
Cavin, can I get a review? The fix is to move the place we mark the message read
to after we've set it up in the db, so that the counts will be handled
correctly. The basic problem is that when we were marking it read before adding
it to the db, we were decrementing the unread counts for the db and thread when
we hadn't incremented it in the first place for the new msg.

The fix for the filter action might supercede this fix - we'll see.

Comment 7

15 years ago
Comment on attachment 106404 [details] [diff] [review]
proposed fix for msgs added to ignored threads

r=cavin. Good one.
Attachment #106404 - Flags: review+
Comment on attachment 106404 [details] [diff] [review]
proposed fix for msgs added to ignored threads

sr=sspitzer

before checking in, can you add a comment like:

// mark as read after we've set it up in the db
Attachment #106404 - Flags: superreview+
(Assignee)

Comment 9

15 years ago
Created attachment 106435 [details] [diff] [review]
proposed fix for mark read filter problem.

this fixes it so we don't update the folder counts if we try to mark read a hdr
that's not in the db. I also fixed it so we don't mark as new hdrs that are
marked read.
Comment on attachment 106435 [details] [diff] [review]
proposed fix for mark read filter problem.

sr=sspitzer
Attachment #106435 - Flags: superreview+

Comment 11

15 years ago
Comment on attachment 106435 [details] [diff] [review]
proposed fix for mark read filter problem.

r=cavin.
Attachment #106435 - Flags: review+
(Assignee)

Comment 12

15 years ago
fixed checked in.
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED
(Reporter)

Comment 13

15 years ago
Verified with 1.3a release:
Mail and news messages marked as read by filters, and news messages to ignored
threads do not change the unread counts on mail folders or news groups.

A big thank you to David, for fixing this. This bug was rather annoying...
Status: RESOLVED → VERIFIED

Comment 14

15 years ago
Thought for a mo that this was related to bug 190301.  But it seems from
experiment that it isn't.

Comment 15

15 years ago
*** Bug 190301 has been marked as a duplicate of this bug. ***

Updated

15 years ago
No longer blocks: 71728
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.