Skip to content

Read and unread status

ari edited this page Sep 13, 2010 · 2 revisions

This feature has now been implemented.

Current problem

Users want to keep up to date with messages added to their tasks. The timeline has too much info. The alternative is to accept notifications for every change to the task, which fills up your inbox.

Solution

Each task is flagged as read or unread for each user who is ‘attached’ to that task.

Schema

There are two relations from task to user at the moment.

  • task_owners
  • watchers

Each one would be given a new (NOT NULL) boolean flag: “unread”.

As a further improvement, not needed here, but very useful, these two relations should be collapsed into one join table with another flag “assigned” to distinguish the two states. This would make the schema clearer and simpler. Plus, it would avoid duplicates since it is not useful for someone to be both assigned (owner) and watching. Finally, the GUI would become simpler since it would be easier to display both sets of people in one list, with different icons designating each type of user relationship.

User interface

Whenever a user adds a new message to a task by any means (including by sending an email), all assigned users and watchers apart from the user who created the message are marked as unread.

An unread icon is shown for those tasks in the task list view as well as at the top of the task edit view. Clicking on this icon makes it change to a very very light grey and it is then ‘read’. Clicking again returns the state to ‘unread’. These events are ajax, so no separate save is needed.

Since the state can be moved back to unread, some users will use this to mean “flagged” and not just “unread”. That’s fine.