|
| Summary: |
"Load older notifications" skips the notifications that are in the same second as the last displayed one |
| Issue Type: |
Bug |
| Affects Versions: |
12.7-rc-1 |
| Assignee: |
Unassigned |
| Components: |
Notifications |
| Created: |
02/Oct/26 21:36 |
| Priority: |
Major |
| Reporter: |
Vincent Massol |
| 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-17638 with 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. |
|