Commit Graph

97 Commits

Author SHA1 Message Date
Jarek Radosz a5fb9a5e1f
DEV: Fix a core deprecation (#504)
Re-lands #475
2023-08-28 10:02:29 +02:00
Jarek Radosz a476aeb222
Revert "DEV: Fix a core deprecation (#475)" (#478)
This reverts commit 968751c8a9.

To be re-applied when 3.1.0.beta5 is released.
2023-06-01 19:54:52 +02:00
Vinoth Kannan fb89a23530
FEATURE: skip group invite if all members can see topic already. (#474)
We don't want to invite a group when all of its members are part of another group that is already allowed to the topic.
2023-05-27 22:29:38 +05:30
Jarek Radosz 968751c8a9
DEV: Fix a core deprecation (#475) 2023-05-26 15:40:40 +02:00
Vinoth Kannan f97da59dee
FIX: don't invite user when already a member of an allowed group. (#473)
Otherwise, when an allowed group member is assigned to the PM it invites the user (which is unnecessary) and creates a public small post for the invite.
2023-05-24 11:45:50 +05:30
Vinoth Kannan dcaadb75dc
FEATURE: invite user/group to PM if not a participant already. (#471)
When a group or user is assigned to a personal message, if they are not already a participant, invite them to the PM before assignment.
2023-05-22 14:48:08 +05:30
Natalie Tay 7562925e0d
FIX: Also evaluate list controller extensions (#455) 2023-03-23 21:35:12 +08:00
Bianca Nenciu 858636cf72
DEV: Update plugin to match latest guidelines (#450)
This commit updates the plugin to follow the latest guidelines, as
shown in discourse-plugin-skeleton, removing the explicit require calls
and using config/routes.rb for defining all routes.
2023-03-23 11:12:04 +02:00
Penar Musaraj 99e5bb48c9
Revert "DEV: Update plugin to match latest guidelines (#448)" (#449)
This reverts commit 8548df4138.
I suspect this is causing smoke tests to fail. Reverting to confirm.
2023-03-08 14:53:50 -05:00
Bianca Nenciu 8548df4138
DEV: Update plugin to match latest guidelines (#448)
This commit updates the plugin to follow the latest guidelines, as
shown in discourse-plugin-skeleton, removing the explicit require calls
and using config/routes.rb for defining all routes.
2023-03-08 15:15:12 +02:00
Bianca Nenciu d8ad876368
DEV: Update plugin to match latest guidelines (#446)
- Define extension modules
- Use different files instead of plugin.rb
- Make sure the plugin is disabled according to the setting
2023-02-17 17:35:41 +02:00
Krzysztof Kotlarek c036d030dc
FIX: reassign when assignment limit is fulfilled (#419)
Previously, when topic was already assigned 5 times, reassign was not possible. User had to first unassign topic and then assign to someone else.
2023-01-20 13:34:22 +11:00
Jan Cernik 896d0e3445
FIX: Broken posts when assigning a closed topic (#425)
The previous behavior was:
1. Assign a topic to someone
2. Close the topic with the setting unassign_on_close enabled
3. Assign the topic to the same user as before

This caused small broken or empty posts to be displayed.

This commit also introduces system specs
2023-01-17 08:09:35 -03:00
David Taylor 46dd26963c
DEV: Introduce syntax_tree for ruby formatting (#408) 2022-12-23 20:35:55 +00:00
David Taylor 4902ba6993
DEV: Bump rubocop-discourse and correct violations (#409) 2022-12-23 19:55:31 +00:00
Andrei Prigorshnev 31d1a798f4
FEATURE: do not suggest users on vacation (#395) 2022-12-14 12:42:17 +04:00
Penar Musaraj 4b8afc301a
FEATURE: Cleanup notifications when reassigning (#394)
If a topic is initially assigned to user A then reassigned to user B,
this change will make it so that notifications sent to user A are
removed. This matches the plugin's behaviour when unassigning a topic.
2022-11-24 10:42:19 -05:00
Bianca Nenciu 1dfbc84896
FIX: Count only active assignments when checking limits (#375)
Only 5 assignments can exist simultaneously for a topic or its post.
The code that counted the assignments did not ignore the inactive
assignments which made the limit check more strict than it should have
been.
2022-08-30 19:56:03 +03:00
Bianca Nenciu 4046c9fb40
FIX: Find better users for automatic assignment (#370)
There were two problems with the way current automation script for automatic
assignment works:

- it tried to assign users that were not allowed to be assigned because they
were not part of groups that are allowed to use discourse-assign - fixed by
skipping users that are not a part of assign_allowed_on_groups groups

- it assigned new users - fixed by adding a new user that can skip new users
2022-08-25 15:13:33 +03:00
Bianca Nenciu acb9025ede
FIX: Check if assignment has same user and details (#368)
The check existed, but its implementation was incorrect and it did not
work when the target was a post.
2022-08-18 18:16:20 +03:00
Osama Sayegh d9a750d306
DEV: Add assignment ID to assign notification data (#365)
This change makes it possible to associate an assign notification with the `assignments` record that creates the notification. It'll be needed for the assignments tab in the new experimental user menu, see https://github.com/discourse/discourse/pull/17379.
2022-08-11 06:43:49 +03:00
Rafael dos Santos Silva 7a2fde72c6
FEATURE: Assign Status (#363)
Adds a new plugin setting that when enabled adds a status field for every assignment. This setting defaults to off.

The possible status for an assignment are customizable via yet another new setting, and the first one on this list will be the default status for new assignments.

The status is not yet show anywhere except the assign modal and the small action posts in topics at the moment. Adding status to the assignment list for users and groups will be handled in the near future.


Co-authored-by: Penar Musaraj <pmusaraj@gmail.com>
2022-08-04 14:50:18 -03:00
Rafael dos Santos Silva 6116f26642 DEV: Apply syntax_tree formatting 2022-07-27 13:48:51 -03:00
Krzysztof Kotlarek 0b5f688451
FIX: ensure that assignee is participant of pm (#349)
We are already checking that assignee has access to the private message. However, admin still can be assigned as technically they have access.

We should ensure that assignee has direct access to the message.
2022-06-16 10:08:22 +10:00
Vinoth Kannan 4ab491ec14
FIX: include users who were assigned to a post instead of topic. (#347)
While assigning a random user in group to the topic posts, if we didn't include the users who were assigned to indivitual posts then the same users will be assigned again and again.
2022-06-09 04:31:29 +05:30
Natalie Tay 43a3030707
FEATURE: Shows note in moderator post (#335) 2022-05-12 23:55:57 +08:00
Natalie Tay fbdfb7143b
DEV: Small refactors for future work (#332) 2022-05-11 14:03:54 +08:00
Natalie Tay b314882a6b
FEATURE: Show note in tooltip (#327) 2022-05-05 15:04:57 +08:00
Natalie Tay 1ac2dfbae2
FEATURE: Add assign note (#326) 2022-05-05 13:21:14 +08:00
Joffrey JAFFEUX f657239a4b
FEATURE: improves random assign to assign to a post (#300) 2022-03-14 10:55:50 +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
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
communiteq 43f93d9611
Fix: set these fields in condition below only (#273)
Co-authored-by: Richard <richard@communiteq.com>
2021-12-24 11:24:57 +11: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
janzenisaac 5910fd5569
FIX: Refactor assign / reassign to combine logic (#250)
* Refactor and combine assign / reassign logic
2021-12-02 13:12:00 -06:00
janzenisaac 98103586b2
FEATURE: Reassign workflow (#231)
Build a new workflow that adds a dropdown in place of the old assign button with the ability to

Re-assign a new user / group to an assigned topic
Re-assign yourself to an assigned topic
Unassign a user / group from an assigned topic
2021-11-12 10:09:47 -06:00
Krzysztof Kotlarek 69dac06a82
FIX: correctly update UI when post is assigned/unassigned (#233)
Update topic title, first post and related post
2021-11-09 08:40:43 +11:00
Krzysztof Kotlarek 2d1f5668a5
FIX: rename action_code_href to action_code_path (#234)
We should use relative paths, therefore name change is necessary to avoid confusions. Post migration is added to fix existing data.
2021-11-08 14:32:21 +11:00
Krzysztof Kotlarek 22025b35b8
FEATURE: small post action with link to post (#232)
When a post is assigned/unassigned, we want small action to have a link to the specific post.
2021-11-08 08:25:13 +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
Krzysztof Kotlarek 95cd224898
FIX: deprecate TopicAssigner (#221)
Delegate to assigner and add deprecation note
2021-10-27 15:42:51 +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
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 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
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
Joffrey JAFFEUX 0046041e9e
FEATURE: improves random assign automation (#166)
- 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
2021-08-20 12:22:37 +02:00
Jarek Radosz 470dd939aa
DEV: Move assignments from custom fields to a table (#169) 2021-07-14 10:48:19 +02:00