Unread message indicator in desktop - how to decrease count

Hi, this maybe a daft question but I can’t find the answer anywhere. The unread message notification box on the desktop (top right corner) shows when new transactions have been made and which increases the more I ‘play’ with the system. How do you reduce the message count or read the unread messages. At the moment this counter jsut seems to go one way - up!

Thanks for your help.

1 Like

have you tried to refresh with cleared your cache?

Yes. Tried that without any success.

Can anyone else tell me how this notification is supposed to work? I’ve tried clicking on the unread messages which takes me to the appropriate page, but the message count remains the same. I can’t see the point of a counter if you can’t clear the messages.

Unread messages should reduce automatically (in a few seconds) when you see the messages page. What version are you using?

ERPNext 5.1.2 under Chrome Version 43.0.2357.130 m.

Just to make sure that I’, not doing something daft, I hover over the notification button (top right) on the desktop and see the unread messages unfurl. When should they they decrease - upon seeing the message list, or when I click through to each section? Either way, it doesn’t appear to work for me.

I’ve just noticed that the notification bar refreshes itself after a few 5 or 10 seconds as you described but it does not decrease the notification count. Is this linked to a bug mentioned under Github ref #3534?

I am also experiencing this behavior of the notification area
I am using:
ERPNext: v8.3.6 (master)
Frappe Framework: v8.3.10 (master)

I read the error logs and they changed status to seen. However the notification area did not change.


I too am puzzled - in my case 4 emails apparently remain unread or open! But I can find no way to filter or identify precisely which ones they are, for me to close them. The lists they refer to are mysteriously empty!?

I stumbled on bot.py and wonder if this code may be responsible for these baffling counts? I will explore the code to trace/deduce/confirm whether that is the case. Then maybe we can solve this problem.


1 Like

ok I abandoned the bot.py as culprit theory…

The Administrator has 2x ToDo items and 1x Error Snapshot but no lists!?

The user session code for them looks to be the smoking gun: frappe/notifications.py at develop · frappe/frappe · GitHub

For example these get_x methods run SQL queries that bear investigation:

def get_things_todo(as_list=False):
“”“Returns a count of incomplete todos”“”

“returns unread emails for a user”

To conclude my experience report -

With the sql below from get_unread_emails() I was able to id my 4x ‘rogue’ emails to close them.

Their email owner and parent differed - reassigned perhaps? - that might explain why they did not show up in any list…

SELECT count(*) FROM tabCommunication WHERE communication_type=‘Communication’
AND communication_medium=“Email” AND email_status not in (“Spam”, “Trash”)
AND email_account in (
SELECT distinct email_account from tabUser Email WHERE parent="info@gmail.com" )
AND seen=0;

The sql query here may differ from the query that displays a list view, that might mean a bug?

I must find the code that lists emails in a view to compare with this sql.



It will change after you refresh or reload you site.

Hope this helps.

“It will change after you refresh or reload you site.”

Ideally but that’s not always the case krnkris - the discussion is about what the do when you get a non zero count but the dropdown takes you to an empty email list (for example)!?

Myself I ended up manually deleting some ‘orphan’ emails from tabCommunication.

(A few emails seemed to be Calendar Event notices that had been reassigned or something like that.)

1 Like