Commit Graph

31 Commits

Author SHA1 Message Date
Nat 1e0fa0a0c7
Remove unneeded require 2022-04-25 19:33:37 +08:00
Nat 4489b9d4fe
Commit and return priorities in topics and posts 2022-04-20 02:15:36 +08:00
Bianca Nenciu b4d85bd0ae
FIX: Count and show only active assignments (#286)
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.
2022-01-28 11:07:42 +02:00
Krzysztof Kotlarek dc8f43fbb1
FEATURE: Assignment target is polymorphic (#218)
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)
2021-10-14 09:22:29 +11:00
Jarek Radosz d807491df2
FEATURE: Assign to group (#182)
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.
2021-08-27 09:25:38 +10:00
Jarek Radosz 470dd939aa
DEV: Move assignments from custom fields to a table (#169) 2021-07-14 10:48:19 +02:00
Osama Sayegh c5b549b887
FIX: Improve error message when assigning a PM to a user who doesn't have access to the PM (#137)
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>
2021-01-27 14:57:41 +03:00
David Taylor c4aefd5917
REFACTOR: Use core `default_results` function (#111)
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.
2020-09-16 12:18:14 +01:00
Ahmed Gagan 069adc1af7
FEATURE: Allow searching topics in group assigned tab (#97) 2020-08-12 23:40:04 +01:00
Ahmed Gagan f250dca93f
FEATURE: Allow filtering users in group assigned tab (#95) 2020-08-12 23:39:14 +01:00
Ahmed Gagan 6dbf3e2bcb
FEATURE: Allow sorting assigned topic lists 2020-08-04 15:48:33 +01:00
Ahmed Gagan 190681cdd1
FIX: Exclude deleted topics from assignment counts (#84) 2020-07-22 17:31:52 +01:00
Ahmed Gagan 816f3c0e97
FEATURE: Per-member counts in group assignment summary (#80) 2020-07-21 12:55:34 +01:00
Ahmed Gagan bfb32aa2ea
DEV: Additional specs for group assign summary (#81) 2020-07-21 12:18:18 +01:00
David Taylor 4630dab7ac
SECURITY: Improve topic permission checks 2020-07-21 10:12:48 +01:00
David Taylor 07c13651c6
FIX: Correct assign user autocomplete logic
Previously we were only autocompleting users which were in the same group as the acting user.
2020-04-28 13:55:17 +01:00
romanrizzi 2adcd9a832 DEV: Remove backward-compatibility code now that 2.4 is the new stable 2020-03-02 10:53:39 -03:00
Sam Saffron 0cea63029c FEATURE: order assigned list by reverse bump date
Previously this list was randomly ordered
2019-11-01 15:35:12 +11:00
Bianca Nenciu b96379e9b1 DEV: Simplify unit test 2019-09-18 22:24:40 +03:00
Bianca Nenciu eb2359dca1 DEV: Add test for assigned
Follow-up to c46764e804
2019-09-18 18:22:21 +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
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 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
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
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
Guo Xiang Tan 8fca0f61e8 Add frozen string literal comment to files. 2019-05-13 10:30:21 +08: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
Saurabh Patel b20b4c088d FIX: add translations and check for message and if assignment is successful in spec (#22) 2018-12-06 18:04:31 +11:00
Saurabh Patel a2e7fc4cac FIX: do not assign to same when already assigned 2018-12-06 16:46:08 +11:00