Commit Graph

8 Commits

Author SHA1 Message Date
Blake Erickson cfd35db208
FIX: If a group is deleted also remove assignments (#592)
This fix addresses an issue if a group is deleted topics will remain
assigned to all group members with no way to un-assign those users from
the original group assignment.

Now if a group is deleted any group assignments are also deleted.
2024-09-10 14:05:48 -06:00
Loïc Guitaut c696e44714 FIX: Recreate notifications on topic reopening
Currently, when reopening a topic that has assignments, the
notifications in the user menu aren’t recreated.

This patch fixes that issue. It also addresses the same type of issue
with posts being destroyed and recovered.
2024-03-18 10:56:08 +01:00
Loïc Guitaut 80604e9012 FIX: Display assignments in user menu properly
Currently, we display a mix of topics and notifications in the user menu
assignments tab. This has a number of issues like having to maintain
hard to understand code instead of simply relying on the notifications
system we have, we can’t display more than one assignment per topic and
it’s not clear if an assignment is for a topic or a post nor if it’s a
group assignment or an individual one.

This patch addresses those issues by relying on the notifications system
we’re using for most of the other user menu tabs instead of a custom
implementation. This led to some heavy refactoring but it was
worthwhile as things are a bit more normalized and easier to reason
about. Instead of serializing topics with different attributes to access
various assignments, we now simply return a notification for each
existing assignment.

The UI changed a bit: tooltips are now explaining if the assignment is
for a topic or a post and if it’s for an individual or a group. Icons
are also properly set (so no more individual icon for group assignments)
and the assigned group name is displayed.

The background jobs signatures changed a bit (`assignment_id` is now
needed for the unassign job) so when deploying this patch, it’s expected
to have some jobs failing. That’s why a post-migration has been written
to handle the creation of missing notifications and the deletion of
extra notifications too.
2023-11-08 15:26:57 +01:00
David Taylor 4902ba6993
DEV: Bump rubocop-discourse and correct violations (#409) 2022-12-23 19:55:31 +00:00
Rafael dos Santos Silva 6116f26642 DEV: Apply syntax_tree formatting 2022-07-27 13:48:51 -03: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 470dd939aa
DEV: Move assignments from custom fields to a table (#169) 2021-07-14 10:48:19 +02: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