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 an assigned post is deleted, we should not error. For now, assignment object is left untouched to not lose information when post is `undeleted`.
We can change that behaviour later if we decide that assignments should be deleted as well.
When an assigned post is moved to the new topic, it becomes topic assignment.
When an assigned post is moved to an existing topic it stays post assignment
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.
- Makes a best attempt at being random and assigning people who haven’t been assigned for a long time
- Uses timezones and holidays
- Allows to define a minimum delay between assignments
- Creates a post if no one is available
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
This reverts commit ed51dcef10.
Plugin triggers a N+1, and the N+1 protection breaks search
everywhere
StandardError (Attempted to access the non preloaded custom field
'assigned_to_id'. This is disallowed to prevent N+1 queries.)
This significantly reduces the amount of logic we need to carry in the discourse-assign plugin. One side effect is that I had to rename the 'q' parameter to 'search', so that it matches core's implementation.
Adds three new search modifiers:
- in:assigned for assigned topics
- in:unassigned for unassigned topics
- assigned:{username} to list topics assigned to a specific user
These modifiers are all made available in the advanced search sidebar
* FEATURE: Trigger webhook when assigning and unassigning topics
This PR creates a custom webhook event that you can now select when
creating a webhook to trigger only when a topic has been assigned or
unassigned.
* removed unused file
* Removed functionality that was added to core
This PR into discourse core:
https://github.com/discourse/discourse/pull/9110
adds what was removed in this commit.
It is better to have this logic in core so that it is discoverable and
future webhooks won't end up accidentally using the same ID.
When a category is used exclusively for managing topic assignments it can
be very useful to list all the unassigned topics. This introduces a new
category setting that allows admins to opt for this new navigation item.
It works both on mobile and desktop.
This uses an amended nav item API, to experience this fully you need latest
versions of Discourse.
When a category is used exclusively for managing topic assignments it can
be very useful to list all the unassigned topics. This introduces a new
category setting that allows admins to opt for this new navigation item.
It works both on mobile and desktop.
Unfortunately Discourse is lacking internal APIs for cleanly adding NavItems
We will look at improving this soon.
* DEV: use group ids to allow assign on groups (#38) [Undo Revert]
This reverts commit 8f92c5f9bd.
* Set the default inside a migration based on the core migration. Improve migration check to work against tests-passed/beta/stable.
* Update db/migrate/20190718144722_set_assign_allowed_on_groups_default.rb
Co-Authored-By: Robin Ward <robin.ward@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: Display PMs in assigned activity and differentiate them.
* FEATURE: Unassign/Re-assign tasks from the activity view
* Remove bulkAssign. Reuse assign/unassign with a service. Change PM icon position
* Reuse ListItemDefaults instead of duplicating code.
* Conditionally show/hide feature if list items defaults is present in core
* 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