Implements a new design that improves the user experience:
- add a clear cancel button
- add an indication the note is optional
- change the plus icon to a search icon
- show an error when the user tries to assign without choosing an assignee
- move suggestions to default search results
- focus search input when modal is displayed
As of 12ebdf0ff0, it's possible to make tabs in the experimental user menu link to a page when they're clicked on when they're active. This commit makes the assign tab links to `/my/activity/assigned` when it's active.
This commit adds a tab for assignments in the experimental user menu. The assignments tab behaves very similarly to the bookmarks and messages tab in core: it displays the user's unread assign notifications first and then fills the rest of available space in the menu with assignments (same content that the current user menu displays).
More details of the experimental user menu can be found in https://github.com/discourse/discourse/pull/17379.
Adds a new plugin setting that when enabled adds a status field for every assignment. This setting defaults to off.
The possible status for an assignment are customizable via yet another new setting, and the first one on this list will be the default status for new assignments.
The status is not yet show anywhere except the assign modal and the small action posts in topics at the moment. Adding status to the assignment list for users and groups will be handled in the near future.
Co-authored-by: Penar Musaraj <pmusaraj@gmail.com>
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
The first issue is using `updateCurrentUser` when code was conditional
in an initializer. Instead we need to use `needs.user()`.
The second issue was trickier to track down but we were using an
observer in a syncrhnous way which is not allowed in newer Embers. This
removes the observer (and some dead code around it!) so that we can
execute that code synchronously.
If the user selected Never for their frequency of assigned topic
reminder PMs, the option automatically set back to the default
value (Monthly) because of the user of the `or` computed helper,
which considered the 0 value of Never to be falsey.
This is the same problem that occurred in core which was fixed by
d3779d4cf7
We need to be careful around using the `or` helper if any of the
options could be considered falsey.
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.
Since this commit
195dcc92cb
the updateUsername function was missing an @action decorator. This adds
it back and extends the assign acceptance tests to click the
mobile/desktop assign buttons and open the modal and click the
suggestion to save the assignment.