If `SiteSetting.unassign_on_close` is enabled, an Assignment record can still exist, but be set to inactive, when a Topic is closed.
Inactivement Assignments should be ignored when comparing to the maximum number of assigned topics.
When topic is closed, we mark assignments as "inactive". Then when it is reopen and setting reassign_on_open is enabled, we bring back previous assignments.
We were already using custom fields for archive message and move to inbox. I changed custom fields solution to use active flag on Assignment model
When post is already assigned to user/group then don't allow assigning a topic to that user/group.
Similarly, right now when topic is already assigned we are not allowing to assign a post that that user.
Build a new workflow that adds a dropdown in place of the old assign button with the ability to
Re-assign a new user / group to an assigned topic
Re-assign yourself to an assigned topic
Unassign a user / group from an assigned topic
Change `topic_id` to polymorphic approach (In the next step we will allow assigning to individual post)
`topic_id` column is still used for efficient display of assigned users on topic list (to avoid scanning posts)