Commit Graph

188 Commits

Author SHA1 Message Date
Martin Brennan e2057ca27b
FIX: Preload assigned users for BookmarkQuery (#63)
* Preload assigned users for BookmarkQuery

* Ensure bookmark query exists + responds to new methods
2020-03-19 15:48:49 +10:00
Martin Brennan baba785b44 Fix UserBookmarkSerializer topic references 2020-03-13 11:10:48 +10:00
Martin Brennan e7d5c88c8b
FEATURE: Add assigned to user to bookmark serializers (#62)
Add assigned to user to bookmark serializers, and also add to JS bookmark model for the route to assigned user.
2020-03-12 15:21:48 +10:00
Blake Erickson 32653be260
FEATURE: Trigger webhook when assigning and unassigning topics (#61)
* 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.
2020-03-06 11:57:46 -07:00
romanrizzi 2adcd9a832 DEV: Remove backward-compatibility code now that 2.4 is the new stable 2020-03-02 10:53:39 -03:00
Roman Rizzi 3593f9ef67
FEATURE: Filter reviewables by assigned user (#58) 2019-11-25 13:48:09 -03:00
Sam Saffron e0de9238a1 FEATURE: new category setting to add "Unassigned" navigation menu
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.
2019-11-01 14:15:28 +11:00
Sam Saffron bc5469c6c6 Revert "FEATURE: new category setting to add "Unassigned" navigation menu"
This reverts commit 600e1b6544.

The level of hack here is just to high, this destabilizes tests. We need a
proper pattern.
2019-10-30 18:16:12 +11:00
Sam Saffron 600e1b6544 FEATURE: new category setting to add "Unassigned" navigation menu
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.
2019-10-30 16:37:13 +11:00
Vinoth Kannan eb02ac1ef5 FIX: always include admins in 'assign' allowed users list. 2019-10-25 17:27:38 +05:30
Jeff Wong e96e67bfbb Add support for unicode usernames 2019-09-20 14:12:23 -07:00
Bianca Nenciu c46764e804
FEATURE: Add endpoint to list all assignments, sorted by user
Includes a fix to let all admin users to use plugin
2019-09-16 13:41:10 +03:00
Roman Rizzi dc6041abcb
DEV: Remove dreprecated review queue code (#47) 2019-09-11 09:51:23 -03:00
Penar Musaraj 2ddc5c5bef Make Rubocop happy 2019-07-29 21:33:25 -04:00
Roman Rizzi 64324ce9db
DEV: use group ids to allow assign on groups [Undo Revert] (#41)
* 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>
2019-07-19 10:30:44 -03:00
Roman Rizzi 8f92c5f9bd
Revert "DEV: use group ids to allow assign on groups (#38)" (#40)
This reverts commit b256d462bf.
2019-07-16 11:59:33 -03:00
Roman Rizzi b256d462bf
DEV: use group ids to allow assign on groups (#38)
* DEV: use group ids to allow assign on groups

* FIX: Dinamically sets the default value to support older versions
2019-07-16 11:33:04 -03:00
Sam Saffron e4be0f02b7 Revert "Staff is always allowed to assign (#36)"
This reverts commit bb200f5fbd.
Unfortunately that commit broke assign
2019-06-18 16:00:10 +10:00
Roman Rizzi bb200f5fbd
Staff is always allowed to assign (#36) 2019-06-17 10:11:00 -03:00
Sam Saffron fe746fefc0 PERF: remove N+1 query from assign
Also makes looking for allowed groups much more
efficient
2019-06-05 11:03:29 +10:00
Roman Rizzi f312ece4a9
Feature: Allow assign on groups (#31)
* 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
2019-06-04 09:21:33 -03:00
Roman Rizzi abe8142038
FEATURE: Users can override reminders frequency (#30)
* 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
2019-05-27 10:53:37 -03:00
romanrizzi 8ca446eeed Make rubocop happy and use defined? when checking for reviewable_api_enabled 2019-05-15 16:18:24 -03:00
romanrizzi c882b097f8 Remove 'Unassign All' feature 2019-05-15 15:57:28 -03:00
Régis Hanol 615ad7c5c3
FIX: don't 'return' in 'flag_reviewed' block 2019-05-15 12:50:52 +02:00
Roman Rizzi 4b7a99f017
Disable flagging behaviour in favor of the new reviewable API (#34) 2019-05-14 16:29:50 -03:00
Guo Xiang Tan 8fca0f61e8 Add frozen string literal comment to files. 2019-05-13 10:30:21 +08:00
Roman Rizzi f330120f90
Assigned topics are now ordered by topics.bumped_at (#32) 2019-05-07 12:43:47 -03:00
Roman Rizzi e3b2e5bdb6 FEATURE: Display PMs in assigned activity and differentiate them. (#27)
* 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
2019-05-07 16:30:47 +10:00
Roman Rizzi 7b7432990a FEATURE: Remind users of assigned tasks. (#28)
* 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
2019-04-30 10:02:26 +10:00
Bianca Nenciu 801b1cd48c FIX: Check if topic is assigned before assigning again. (#25) 2019-03-15 18:49:22 +01:00
Gerhard Schlager 5527457ce2 FIX: Do not unassign on topic open 2019-01-10 20:58:20 +01:00
Bianca Nenciu 89f794cf83 FEATURE: Add events for assigning and unassigning topics. (#24) 2019-01-09 16:59:26 +11:00
Bianca Nenciu 0299deaf25 FIX: Unassign on autoclose. 2018-11-21 15:49:07 +02:00
Penar Musaraj c6f21b667a Support FA5 SVG icons 2018-11-07 09:27:15 -05:00
Vinoth Kannan bb44fd469c FIX: Do not raise error if topic not exist 2018-09-21 09:52:21 +05:30
Sam 8ad7304bdd FIX: can now correctly unassign corrupt topics
if a topic is somehow assigned to an array we can correctly unassign
2018-09-04 15:10:17 +10:00
Régis Hanol 5800f768f5 FIX: properly unassign topics if there are no **more** flags to handle 2018-08-14 18:20:00 +02:00
Joshua Rosenfeld 962c4bf836
URL was missing from plugin.rb 2018-06-11 11:47:43 -04:00
Guo Xiang Tan fe68b6cc88 FIX: Don't unassign topic on flag reviewed if topic has been deleted.
* Should have a test for this.
2018-05-25 16:40:00 +08:00
Guo Xiang Tan e1c7869969 UX: Add margin to assign-controls on mobile. 2018-05-24 14:44:13 +08:00
Guo Xiang Tan 4e53bf1962 FIX: Include `assigned_messages_count` only when viewing assigned list. 2018-05-24 11:49:49 +08:00
Guo Xiang Tan e48ed99dfe Show assigned messages count as long as assigns is enabled. 2018-05-24 10:51:04 +08:00
Andrew Schleifer 863de29e1d FIX Extra blank line detected 2018-05-23 11:11:24 -05:00
Guo Xiang Tan 22108df6be FEATURE: Display link with count to user's assigned messages page. 2018-05-23 18:16:36 +08:00
Robin Ward 754209ce58 Add "Unassign All" button to user's assigned topics view 2018-05-04 13:41:04 -04:00
Arpit Jalan c24083df5c Remove 'archive' tab for assigned topics. 2018-03-26 22:49:34 +05:30
Guo Xiang Tan 463f77bb2a FEATURE: Add live updates for "assigned" private messages. 2018-03-07 23:02:13 +08:00
Robin Ward 8ee1cbd697 FIX: Unassign topics if there are no more flags to handle 2018-02-26 16:15:22 -05:00
Robin Ward 569a87b136 FEATURE: New site setting to ensure flags are claimed 2018-01-12 16:09:46 -05:00
Guo Xiang Tan 733503e67f FIX: Display group archive topics for groups that the user is in. 2017-12-01 12:21:25 +08:00
Guo Xiang Tan 81244a6a47 FEATURE: Add `archive` tab for assigned topics. 2017-12-01 11:25:54 +08:00
Robin Ward 3e024779fa FIX: Use the proper avatar lookup columns 2017-10-18 16:42:43 -04:00
Robin Ward 246de40653 Add new SiteSetting to disable locking of flags when assigned 2017-10-13 10:46:35 -04:00
Robin Ward a69bd40401 Revert "Revert "Fix field not being preloaded in multisite setup.""
This reverts commit e7ca1ffbf7.
2017-09-29 11:07:31 -04:00
Robin Ward 626965f94c FIX: Use a proper event for removing assign on close 2017-09-27 14:04:27 -04:00
Robin Ward e7ca1ffbf7 Revert "Fix field not being preloaded in multisite setup."
This reverts commit 83b4e9fe3f.
2017-09-27 11:01:29 -04:00
Guo Xiang Tan 83b4e9fe3f Fix field not being preloaded in multisite setup. 2017-09-27 16:21:05 +08:00
Robin Ward 7720ceed24 FIX: Don't preload unless the plugin is enabled 2017-09-25 14:51:49 -04:00
Robin Ward 856c5a5435 FEATURE: Add ability to claim topics on flagged topics page 2017-09-25 12:22:38 -04:00
Robin Ward 7ca73b293a FEATURE: Add ability to claim topics on flagged topics page 2017-09-08 15:31:02 -04:00
Guo Xiang Tan 99db4337fa Use `before_action` for Rails 5 compatibility. 2017-09-04 14:22:12 +08:00
Sam 70911cbd43 preload email correctly (not backwards compat with stable) 2017-08-29 12:49:31 -04:00
Rafael dos Santos Silva c16bf207c7 FEATURE: Allow turning off the plugin from settings 2017-06-05 19:45:33 -03:00
Sam bfdffdca83 FEATURE: easy assign list 2017-03-08 15:55:07 -05:00
Sam bd5575d975 UX: display small action for assignment/unassignment 2017-03-07 17:13:10 -05:00
Sam 6d4f7f0f3a FEATURE: add me and nobody support 2017-03-02 14:42:41 -05:00
Sam 48ac8902ef FIX: show assigned group messages 2017-03-02 09:43:36 -05:00
Sam 7c3e0c6547 FEATURE: use topic list format for assigned
FEATURE: ability to see assigned messages
2017-03-01 16:42:01 -05:00
Sam 23aa28e2b4 FEATURE: reassign on "move to inbox" 2017-02-28 10:33:03 -05:00
Sam 7f23e4f83c FEATURE: unassign on close and unassign on group archive settings
FIX: don't backfill assignment on closed or deleted topics
2017-02-28 10:00:10 -05:00
Sam Saffron c668db2332 correct serialization for unassigned topics 2017-02-21 11:44:17 -05:00
Sam Saffron d7c74701f2 optionally apply a regex to post body when assigning stuff out 2017-02-21 11:26:45 -05:00
Sam Saffron 581e47055c unassign can optionally not create a tracking topic 2017-02-20 11:52:19 -05:00
Sam Saffron 5da7ce9e0f force assign on mention 2017-02-20 10:44:56 -05:00
Sam Saffron 4ec3c1a423 added job for backfilling auto assign 2017-02-20 09:42:28 -05:00
Sam Saffron cb481b35f8 added "assign by staff mention" feature
when enabled if staff mentions other staff topic is auto-assigned
2017-02-19 21:37:39 -05:00
Sam 1c00569200 wrong serializer was used 2017-02-17 17:34:36 -05:00
Sam bf8733d110 allow for * filter 2017-02-17 16:48:05 -05:00
Sam c06761b396 allow to unassign a topic
default select assigned user
display icon for assigned user
2017-02-17 16:40:43 -05:00
Sam 5d1f9e5a1f We now have a partially working filtered list 2017-02-15 15:39:49 -05:00
Sam a6861ba65a public and private mode, add customizable user link path 2017-02-15 12:35:07 -05:00
Sam 13d070c823 preload owner in topic list 2017-02-14 17:44:17 -05:00
Sam Saffron c7253f1d38 Add panel that shows who topic is assigned to 2017-02-10 17:45:22 -05:00
Sam 0205a12956 add user action and correct icon for small post 2017-02-10 13:02:25 -05:00
Sam 7b0d192b57 cleanup and add mod message if needed 2017-02-08 13:07:56 -05:00
Sam f2d31b83a2 partially implement modal 2017-02-07 14:22:46 -05:00
Sam c68a6652ec initial commit 2017-02-02 17:05:33 -05:00