winfried / HelpIM

*obsoleted* An chat-system for online psycho-social counselling
11 stars 3 forks source link

Staff does not get the chats assigned in order #289

Open winfried opened 10 years ago

winfried commented 10 years ago

Observed on one chat on several occasions (verified by the logging): one staff member, the longest waiting, does not get a chat assigned. Could not reproduce the bug. Possibly the One2OneRoom.status_timestamp gets updated while waiting.

winfried commented 10 years ago

Bug is caused by a missing additional user info record for the staff, making her or him end up lower in this comparison: order_by( '-staffuseradditionaluserinformation__chat_priority', 'status_timestamp')

Workaround is making sure the user has a division assigned, causing the record to be created with the default priority. The record should always be created when creating a user.