Page MenuHomePhabricator

Cross-wiki counter does not show correct number of unread messages
Closed, ResolvedPublic

Description

i.e. does not take bundle counting into account:

When collapsed, it says I have 3 messages, but the counter says 5 and when expanded I see two bundles of 2 and one single message, so 5 is the correct number.

Event Timeline

Catrope created this task.Jun 28 2016, 10:45 PM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJun 28 2016, 10:45 PM
SBisson claimed this task.Jun 29 2016, 1:09 PM

Change 296574 had a related patch set uploaded (by Sbisson):
Fix foreign bundle count

https://gerrit.wikimedia.org/r/296574

Change 296574 merged by jenkins-bot:
Fix foreign bundle count

https://gerrit.wikimedia.org/r/296574

Etonkovidova added a subscriber: Etonkovidova.EditedJun 30 2016, 7:13 PM
  1. The counter for cross-wiki bundles (beta-labs) consistently shows the sum of both Alerts and Messages.

e.g. User cawiki has only cross-wiki Alerts and Messages


Another example

  1. Expanded Alerts from the first screenshot show 5 new messages on user's talk page and the message that the user's comment was edited several times (unspecified). What was calculated there? The number of multiple edits of the user's comment might be 3 times according to overall badge count or it may be 15-5=10 times according to the sub-panel counter.

Open Messages (the flyout counter shows 7, the cross-wiki sub-panel counter shows 15 again )

Expand it - the number of cross-wiki notifications is actually 7(6+1), the same count as in the flyout.

Created a simpler example - User:ET91 has 5 events according to db:
3 events in cawiki -

[cawiki]> select event_id, event_type, event_deleted from echo_event join echo_notification on notification_event=event_id where notification_user in (select user_id from user where user_name='ET91');
+----------+------------+---------------+
| event_id | event_type | event_deleted |
+----------+------------+---------------+
|     1279 | welcome    |             0 |
|     1280 | mention    |             0 |
|     1281 | mention    |             0 |
+----------+------------+---------------+
3 rows in set (0.00 sec)

2 events in enwiki -

[enwiki]> select event_id, event_type, event_deleted from echo_event join echo_notification on notification_event=event_id where notification_user in (select user_id from user where user_name='ET91');
+----------+----------------+---------------+
| event_id | event_type     | event_deleted |
+----------+----------------+---------------+
|   307211 | emailuser      |             0 |
|   307316 | flow-new-topic |             0 |
+----------+----------------+---------------+
2 rows in set (0.00 sec)

(CORRECT) Alerts in cawiki will display two Mentions


Messages will display "Failed to fetch notificaitons" which is filed as T139112: [regression-betalabs] 'Failed to fetch notifications'

Switching to enwiki - cawiki there will have incorrect count:


Expand cawiki Alerts - two Mentions are here, but apparently 'Welcome' was counted?:

enwiki Messages - cawiki count is incorrect

Expand cawiki Messages subpanel - only 'Welcome' is displayed:

The specific issue described in this task - count correctly bundled messages in cross-wiki counter - has been fixed, e.g. Cross-wiki sub-panel shows 6 messages from 3 wikis:
ruwiki - 3 msgs
enwiki - 2 msgs
metawiki - 1 msg
They counted correctly by the cross-wiki counter as 6 msgs


jmatazzoni closed this task as Resolved.Jul 5 2016, 10:22 PM