Commit Graph

106 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
Rafael dos Santos Silva 568a13101e
DEV: Use reserved assigned notification type (#302) 2022-03-16 16:23:14 -03:00
Joffrey JAFFEUX f657239a4b
FEATURE: improves random assign to assign to a post (#300) 2022-03-14 10:55:50 +01:00
Jarek Radosz 7307bfada6
DEV: Remove the migration specs (#295)
They're no longer useful
2022-02-23 21:12:24 +01:00
Jarek Radosz 7d83a98b45
DEV: Resolve small TODOs; fix a typo (#296) 2022-02-23 18:23:52 +01:00
jbrw 44dd73e151
FIX: Exclude inactive assigns from assigned_total count (#288)
If `SiteSetting.unassign_on_close` is enabled, an Assignment record can still exist, but be set to inactive, when a Topic is closed.

Inactivement Assignments should be ignored when comparing to the maximum number of assigned topics.
2022-01-31 15:26:58 -05:00
Krzysztof Kotlarek f54f0486b9
FIX: better group assign message (#287)
When topic is assigned to group, then notification should be different to distinguish from direct assignments.
2022-01-30 23:42:44 +01: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 5779385d66
FIX: don't display inactive assignments (#283)
There is an active flag for assignments. It is used to bring assignments back when topic is reopened.

However, when assignment is inactive, it should not be displayed on assigned list or search.
2022-01-19 22:20:21 +01:00
jbrw 7a04569c0a
FIX: Only active assigns should be included in reminders (#281)
* FIX: Only active assigns should be included in reminders

* Update lib/pending_assigns_reminder.rb

Co-authored-by: Robin Ward <robin.ward@gmail.com>
2022-01-14 15:23:29 -05:00
Krzysztof Kotlarek 485aef0e69
FIX: specs for search fix (#267)
Yesterday a quick fix was made with this PR https://github.com/discourse/discourse-assign/pull/266

Here are additional specs to ensure that serializer is not erroring
anymore
2021-12-14 11:26:15 +01:00
Roman Rizzi fe2f629975
FEATURE: Delete previous assign reminder PMs (#265) 2021-12-13 12:59:26 -03:00
Krzysztof Kotlarek 1a1dffc5e8
FEATURE: active flag for assignments (#264)
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
2021-12-13 08:36:14 +01:00
Krzysztof Kotlarek 3eaefb60dd
FIX: dont allow assigning user to topic when post assigned (#259)
When post is already assigned to user/group then don't allow assigning a topic to that user/group.

Similarly, right now when topic is already assigned we are not allowing to assign a post that that user.
2021-12-06 06:09:04 +01:00
Martin Brennan da3fdc1411
DEV: Fix spec (#255)
Broken by 9f8ee8f137
2021-11-22 16:05:15 +11:00
Krzysztof Kotlarek fcd4532c76
FIX: move post assignment when move post (#229)
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
2021-11-04 08:22:53 +11:00
Krzysztof Kotlarek c396605d2f
FEATURE: assign to post (#224)
Ability to assign an individual post to a user or group
2021-11-01 09:27:13 +11:00
Joffrey JAFFEUX 7747bb81a0
FIX: more accurate and flexible random assign automation (#222)
- allows to define the number of days within which a user is considered recently assigned
- more correct by now using post custom fields
2021-10-19 17:31:17 +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
Bianca Nenciu 247c74ecfd
DEV: Add test when user is suspended (#219) 2021-10-12 10:44:59 +03:00
Alan Guo Xiang Tan 5f97e1603d
FIX: Properly fabricate data for topic query specs. (#209)
We were creating PM topics that did not have any posts.
2021-09-15 13:00:28 +08:00
Krzysztof Kotlarek f58b78e027
FIX: add assigned fields to suggested topic serializer (#199)
With hard refresh, information about assigned user disappeared from suggested topics.
2021-09-09 16:59:06 +10:00
Krzysztof Kotlarek ab9e6f0684
FIX: unassign/assign when group pm is archived (#192)
Send correct messages and correctly unassign/assign to user/group if group PM is archived or moved back to inbox.
2021-09-09 14:22:04 +10:00
Krzysztof Kotlarek 62d87f0084
FEATURE: better UI for group assignments (#197)
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
2021-09-09 12:18:18 +10:00
Krzysztof Kotlarek 375f7ba78d
FEATURE: new assignable group option instead of messageable (#195)
V1 of group assign was using "who can message" to determine if group can be assigned.

This PR is introducing new separate setting "who can assign"
2021-09-08 10:30:13 +10:00
Krzysztof Kotlarek b42ec9f779
FIX: correct group icons and notification message (#193)
* New group icon
* Group assignment notification displays group name instead of who assigned
2021-08-31 08:17:43 +10: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
Arpit Jalan 4024eb078c
FIX: filter by "nobody" was broken (#176)
Meta ref: https://meta.discourse.org/t/filter-by-nobody-seems-broken/197770/
2021-07-22 15:00:27 +05:30
Jarek Radosz 09b7655206
FIX: Handle invalid source data in CF migration (#172) 2021-07-14 22:02:27 +02: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
Roman Rizzi 65be8fe69d
FIX: Unassign users after removing them from an assign allowed group. (#134)
Users that aren't members of an assign allowed group can no longer use the feature. Automatically unassign all their topics.
2021-01-25 14:59:42 -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 303274eae3
FEATURE: Advanced search filters for assigned topics (#102)
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
2020-09-11 12:15:50 +01:00
Ahmed Gagan 3e3dc3815b
FEATURE: Assign bulk actions for topics lists (#110)
- Allows unassigning and reassigning topics using bulk actions
- Adds bulk actions UI to the group assigned page
2020-09-11 11:49:25 +01:00
Ahmed Gagan cd31a821fc
UX: Only show assigned tab for groups where all users can assign (#103) 2020-08-28 15:18:25 +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
Ahmed Gagan ae83f70e21
FEATURE: Assignments summary tab for groups (#70) 2020-07-10 09:45:18 +01:00
Martin Brennan b7acd12244
FEATURE: Mark assign notifications as high priority (#67) 2020-05-11 14:06:31 +10: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
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
Robin Ward 6d3bc3e4d0 FIX: If `fancy_title` was nil the job would fail
This is because we were only selecting `fancy_title` from the DB
and the method has a fallback.
2020-01-27 12:54:50 -05:00