Commit Graph

19 Commits

Author SHA1 Message Date
Loïc Guitaut c33297316a
DEV: Fix new Rubocop offenses (#548) 2024-02-29 18:23:48 +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
Jarek Radosz 6ed4a13fe7
DEV: Update ruby linting (#518) 2023-10-20 17:04:03 +02:00
Krzysztof Kotlarek 0c01e8fdfd
FIX: granular webhooks (#498)
After those core changes we need additional translations

https://github.com/discourse/discourse/pull/23070
2023-10-09 03:26:40 +00:00
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
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
Natalie Tay b314882a6b
FEATURE: Show note in tooltip (#327) 2022-05-05 15:04:57 +08: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 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 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
Guo Xiang Tan 8fca0f61e8 Add frozen string literal comment to files. 2019-05-13 10:30:21 +08:00
Robin Ward 7ca73b293a FEATURE: Add ability to claim topics on flagged topics page 2017-09-08 15:31:02 -04:00