Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
12.7-rc-1
-
None
-
Unknown
-
Description
Steps to reproduce
- As user U2, watch the whole wiki and enable the notifications for page creations.
- As user U1, create 11 or more pages quickly, so that several of them are saved within the same second (scripts, imports and REST clients easily do this).
- As U2, open the notifications menu and click "Load older notifications" until the button disappears.
Expected
Every notification is listed once.
Actual
Notifications are missing: those whose event is in the same second as the last notification displayed before the click are never loaded, neither in the notifications menu nor in a notifications macro (Dashboard activity, user profile, page holding the macro).
Cause
- "Load older notifications" requests the events strictly older than the date of the last displayed notification: the macro script sends untilDate with untilDateIncluded=false (since
XWIKI-17638, which made the bound exclusive to stop the first older notification from being duplicated), and QueryExpressionGenerator#handleEndDate turns it into a strict date < untilDate. - The date of a document event is the document date, which has no milliseconds. So any not yet displayed event in that same second is excluded.
- The blackList parameter, which is sent with the same request and holds the ids of the events already displayed, is enough to avoid the duplicate of
XWIKI-17638with an inclusive bound.
Found while automating the "Load older notifications" manual test (XWIKI-25119): NotificationsIT#simpleNotifications has to wait 1 second before creating the pages whose notifications end a batch, otherwise the test fails randomly.
Attachments
Issue Links
- is caused by
-
XWIKI-17638 First older notification event loaded in Notification Menu is duplicated
-
- Closed
-