Closed Bug 147110 Opened 23 years ago Closed 22 years ago

News: posts to ignored threads decrease unread count for newsgroup

Categories

(MailNews Core :: Database, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: amacz, Assigned: Bienvenu)

References

Details

Attachments

(2 files)

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.
QA Contact: gayatri → laurel
confirming.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Blocks: messagecount
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.
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.
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.
this fixes the original problem. Still working on the filter action problem.
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 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+
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 on attachment 106435 [details] [diff] [review] proposed fix for mark read filter problem. r=cavin.
Attachment #106435 - Flags: review+
fixed checked in.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
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
Thought for a mo that this was related to bug 190301. But it seems from experiment that it isn't.
*** Bug 190301 has been marked as a duplicate of this bug. ***
No longer blocks: messagecount
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: