Read messages are not getting set to read
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
High
|
Robert Lyon |
Bug Description
Mahara: 15.10.1
DB: MySql
OS: Linux
Browser: Chrome and FF
Since the 15.10 upgrade, the 'read' message counter is not working properly.
It doesn't appear that the triggers are updating the usr.read field.
* I've tried with both multi recipient module on and off.
* I manually reset all usr.read = 0 in the DB (just to start with a clean slate)
* sent messages to a different user
* logged in as the other user and their counter hadn't increased.
I then went into the user's inbox and clicked on the message (i.e. to read it), the usr.read field never got updated. Neither did the module_
Using Chrome's developer tools, I can see that there is no network activity to the server to update the field as read:
* either when I click on the message
* or when I select 'Mark as read' from the bulk action with the message selected.
Changed in mahara: | |
status: | New → Confirmed |
importance: | Undecided → High |
Changed in mahara: | |
status: | In Progress → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
This looks to be working in postgres but not in mysql.
I wonder if it's due to the triggers having things like:
UPDATE "usr" SET unread = unread + 1 WHERE id = NEW.usr
Where the table name is escaped in the postgres way, I wonder if it needs to be like
UPDATE `usr` SET unread = unread + 1 WHERE id = NEW.usr
Which if true then there will be a bunch of triggers that need fixing up for MySql