Commit Graph

24 Commits

Author SHA1 Message Date
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
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
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
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
Bianca Nenciu eeccf78c1e
DEV: Admins and mods are already members of staff (#404)
This hack is no longer necessary because fabricated admins and mods are already members of the staff group.
2022-12-20 16:24:21 +02: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
Alan Guo Xiang Tan ed1b344d32
DEV: Persist records to DB in tests (#390)
There is almost no reason for us to use `Fabricate.build` which does not persist the record to the database and is not what we encounter in production.
2022-10-21 17:47:29 +08: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
Keegan George 7e85101b89
FIX: Error bulk deleting posts when action post is already deleted (#371)
* DEV: Break when action post is already deleted

* FIX: Post needs to be unassigned on deletion

* WIP: Add spec

* DEV: Update spec
2022-08-25 12:48:55 -07: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
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
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
Natalie Tay 3151bea1da
DEV: Backfill tests (#324) 2022-04-30 03:10:08 +08: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 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 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