Commit Graph

10 Commits

Author SHA1 Message Date
Gabriel Grubba 0f4a1fcdd3
FIX: Not send notifications when it should never notify assignment (#620)
* FIX: Not send notifications when it should never notify assignment

- Added silenced_assignments table and migration to store silenced assignments
- Added tests for silenced assignments

* DEV: Add annotation to model

* DEV: add empty line after early return

* DEV: lint file
2024-12-12 11:28:11 -03:00
Alan Guo Xiang Tan 10fb723995
DEV: Add `lib` to autoload path (#605)
Why manually require files when we can autoload? Also update
`discourse-rubocop` to 3.8.0.
2024-11-15 06:30:59 +08:00
Mark VanLandingham 6978c752db
FIX: Respect pending_assign_reminder_threshold in enqueue_reminders (#572) 2024-05-10 14:49:35 -05: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
Martin Brennan 7c18124a32
DEV: Fix REMINDER_BUFFER_MINUTES const reassignment warning (#506)
Without ||=, ruby warns the const is being reassigned all the time.
2023-08-31 12:51:51 +10:00
Natalie Tay 55f8d24b1f
DEV: Increase the buffer used to determine whether to send out the reminder email (#499)
Increase the buffer used to determine whether to send out the reminder email
2023-08-15 14:12:10 +08:00
Natalie Tay f5cc748986
FIX: Fix reminder frequency not getting sent daily when early by a few seconds/minutes (#496)
Add a buffer in determining whether to remind a user about assignments
2023-08-10 12:04:27 +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