Commit Graph

218 Commits

Author SHA1 Message Date
romanrizzi 3b2f10a450 Remove fallback PM tag 2019-09-11 17:14:48 -03:00
Roman Rizzi dc6041abcb
DEV: Remove dreprecated review queue code (#47) 2019-09-11 09:51:23 -03:00
Bianca Nenciu 927fdca0a0 DEV: Test if assign_allowed_on_groups contains only visible groups
Follow-up to 7d4b515524.
2019-09-11 14:10:58 +03:00
Kyle Zhao d18c347cd9 FEATURE: Quick access panel for assignments. (#49)
* FEATURE: Quick access panel for assignments.

* Only enable quick access when core is compatiable.

This ensures that the plugin won't break Discourse instances without the
latest `QuickAccessPanel` feature.
2019-09-09 16:12:14 +10:00
Bianca Nenciu 7d4b515524 FIX: Suggest only groups that are visible to current user (#48)
Otherwise, the user would search in groups that were not visible,
operation which resulted in a 403 error.
2019-09-09 15:32:50 +10:00
Roman Rizzi d268d4f817
Fix: Enforce new rules when assigning a topic. (#46)
* assign_to user must be allowed to assign.
* assign_to user must have access to the topic
2019-09-05 10:31:52 -03:00
romanrizzi 2d78151481 FIX: Use can_assign instead of staff to show the assign modal correctly 2019-08-04 18:30:28 -03:00
David Taylor 9c72a2f5ca UX: Add "Assigned" to the page title for the assigned topic list 2019-08-02 15:51:14 +01:00
Penar Musaraj 2ddc5c5bef Make Rubocop happy 2019-07-29 21:33:25 -04:00
romanrizzi 8114684ed8 Initialize allowedGroups inside the constructor 2019-07-24 12:17:42 -03:00
romanrizzi 65fbdc3396 FIX: remove unused import 2019-07-19 14:55:36 -03:00
romanrizzi 8792cf51bd DEV: Assign allowed groups are sent alongside suggestions. After the migration happens, we'll need to still have access to the allowed group names so we can search users. 2019-07-19 14:49:45 -03: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
Joffrey JAFFEUX 49474c94ea
FIX: uses taskActions api and removes old buttons (#44) 2019-07-19 13:32:08 +02:00
Joffrey JAFFEUX 02c6fa6d24
DEV: uses new topic-button API (#43) 2019-07-19 10:20:55 +02:00
Joffrey JAFFEUX 75c6cecfdb
REFACTOR: old ember patterns, deprecations, dead code (#42) 2019-07-19 09:56:39 +02: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
Neil Lalonde 439ebf44ec Update translations 2019-07-15 14:00:07 -04:00
Gerhard Schlager 6d44f4fe29 FIX: Send assignment message in the notified user's locale 2019-07-12 12:08:22 +02:00
Dan Ungureanu dea72e708b FIX: Skip enqueuing reminders if no groups are allowed. (#39)
* FIX: Skip enqueuing reminders if no groups are allowed.

With an empty SiteSetting.assign_allowed_on_groups, it used to generate
an invalid query containing "group_users.group_id IN ()".
2019-07-10 09:58:35 +02:00
Bianca Nenciu 22129d191f
UX: In mobile view show button only under topic controls. (#35) 2019-06-25 16:05:09 +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
Neil Lalonde e1cc07adb1 Update translations 2019-06-17 13:56:40 -04:00
Roman Rizzi bb200f5fbd
Staff is always allowed to assign (#36) 2019-06-17 10:11:00 -03:00
Joffrey JAFFEUX 5bbca9b925 DEV: new API s/replaceCurrentUser/updateCurrentUser 2019-06-14 14:38:10 +02:00
Joffrey JAFFEUX fe80298ae5 FIX: prevents messageBus subscriptions to leak 2019-06-12 10:20:34 +02:00
Neil Lalonde 2aaa5a920f Update translations 2019-06-10 10:38:24 -04:00
Joffrey JAFFEUX d9178cf60c FIX: new select-kit test-helper 2019-06-06 09:34:42 +02: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
Neil Lalonde 8536795da3 Update translations 2019-05-30 11:30:37 -04:00
romanrizzi deea8b59bc FIX: Only show override options to admins 2019-05-27 13:45:54 -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 a0031d596a Remove unused imports 2019-05-15 16:24:14 -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
romanrizzi b4148a8858 Fix template indentation 2019-05-13 17:18:36 -03:00
Guo Xiang Tan 8fca0f61e8 Add frozen string literal comment to files. 2019-05-13 10:30:21 +08:00
Roman Rizzi 2f5af6e2cb FIX: Add a custom mobile view for the assigned-topics-list (#33) 2019-05-09 10:53:45 +10:00
romanrizzi 1eaeb39749 DEV: Add simple acceptance smoke test for the assigned topics list 2019-05-08 18:09:36 -03:00
Roman Rizzi f330120f90
Assigned topics are now ordered by topics.bumped_at (#32) 2019-05-07 12:43:47 -03:00
Régis Hanol 578a7f7b70 UX: slightly more space right to the PM icon 2019-05-07 09:55:22 +02: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
Sam Saffron f5a19501cc DEV: correct spec to meet new design
We now allow self assigns unlimited, but limit
other people once you reach limit
2019-05-03 13:48:43 +10:00
Sam Saffron 96f965ef89 FIX: correct translation key 2019-05-03 11:29:49 +10:00
Sam Saffron 6f031f5432 FIX: correctly count assigned topics for user
Previously we were looking at deleted topics
2019-05-03 11:24:16 +10:00
Roman Rizzi 8583287faf
FEATURE: Limit the amount of assigned topics an user can have. (#29)
* 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
2019-05-02 10:44:11 -03:00