After a topic is closed, the assignment is not deleted but becomes
inactive. When this happened, it was not removed from the assignments
count or list.
There is an active flag for assignments. It is used to bring assignments back when topic is reopened.
However, when assignment is inactive, it should not be displayed on assigned list or search.
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
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)
On the group assignment page, we should be able to display
- all topics assigned to that group + to user belonging to that group
- all topics assigned directly to group
- all topics assigned to individual user
Ability to assign groups.
To assign group, user must have a right to send a message to that group.
In addition, 2 jobs were introduced, - AssignNotification and UnassignNotification to inform interested users in the background about the new assignment.
Included:
* DEV: Post-release cleanup
* DEV: Tests cleanup
* DEV: Import cleanup
* DEV: Drop a compatibility fix
* DEV: Use index_by
* DEV: Use ember imports
* DEV: Use discourseDebounce
* DEV: Use @action
* DEV: Use the optional chaining operator
* DEV: Fix an invalid test
* DEV: Use `discourseModule`
* DEV: Add .prettierrc
* DEV: Sync up the version number
Currently if you try to assign a PM to a user who can't see it, you get an error message that says "@{user} can't be assigned since they don't belong to assigned allowed groups". This commit improves the message and now it tells you the user doesn't have access to the PM and that you need to invite the user before you can assign them.
Signed-off-by: OsamaSayegh <asooomaasoooma90@gmail.com>
* Feature: Allow assign on groups
* Use type: group_list option
* Track group changes and update the setting accordingly. Restrict reminders frequency to assign allowed users instead of staff
* FEATURE: Users can override reminders frequency
* Changes:
- Avoid creating a user custom field when the used didn't override the frequency
- Sanitize frequency value using coercion
- Minor fixes
* Sanitize query and user query single
* FEATURE: Limit the amount of assigned topics an user can have.
* Do not enfore the limit when self-assigning
* Avoid computing the query when self-assigning. Do not count self-assigns when enforcing the limit
* FEATURE: Remind users of assigned tasks.
* User an user custom field instead of adding a new column
* Improve tests. fix assigns count and display oldest assigned topics correctly. Do not remind about recently assigned tasks