This error is intended for cases when a method is
intentionally not implemented, because the module/class defining
it expects a subclass (or class including the module) to implement
the method.
This is intended to distinguish it from other cases, such as:
* feature not implemented yet
* edge case of a method call not yet supported
Notably it avoids the misuse of the Ruby-defined NotImplementedError,
which is only intended for much more specific scenarios:
> Raised when a feature is not implemented on the current platform. For example, methods depending on the fsync or fork system calls may raise this exception [...]
Also see https://docs.ruby-lang.org/en/master/NotImplementedError.html
https://community.openproject.org/wp/57932
Retrying 14 times with polynomial backoff means it will retry for
roughly 1.5 days.
Previously the `retry_on StandardError` defined in the
`Mails::MailerJob` class was ignored because there is also a
`rescue_from StandardError` declared after it. As `retry_on` is
implemented using `rescue_from`, and the handlers are evaluated in
reverse order, the last declared `rescue_from` would be picked up and
the retry logic would not be triggered. That's why mail jobs were
discarded instead of being retried.
This commit fixes the issue by inheriting directly from
`ActionMailer::MailDeliveryJob` instead of redefining its methods. This
was the `rescue_from` is declared first in the parent class, and then
`retry_on` is declared second in the child class, meaning it will take
precedence and be picked up.
The needed shared logic from `ApplicationJob` is extracted to a new
`SharedJobSetup` module and included in both `ApplicationJob` and
`Mails::MailerJob`.
We want `MailerJob` to behave like both our `ApplicationJob` (for
reloading the mailer configuration and resetting the request store
automatically) and `ActionMailer::MailDeliveryJob` (for the basic
functionalities of sending emails).
As we can only inherit from one of these two classes, we inherit from
`ApplicationJob` and copy the relevant parts from
`ActionMailer::MailDeliveryJob`.
This copy was done some time ago, and the `ActionMailer::MailDeliveryJob`
class has evolved since then. This commit updates our copy to match the
current `ActionMailer::MailDeliveryJob` class.
* destroy notifications upon journal destruction
* breakup spec by journable
* have a dedicated job for scheduling journal completed events
* generate notifications in delayed job
* route wiki journal events through notifications
* combine mail sending for notifications into single job
* robustness if a journal is deleted
* linting
* differentiate BaseJournal and AssociatedJournal
BaseJournal holds the data of a journal that reflects the columns in the journaled model while AssociatedJournal reflects the columns of a model associated to the journaled model via a has_many/one association
* route news journal events through notifications
This does not yet include notifications for comments on news
* include news comment in notification workflow
* have the whole workflow in a single state machine job
* include forum message in notification workflow
* include document in notification workflow
* less dependencies from acts as watchable
* fix, test and document workflow job
* Add bell icon to icon font
* Add in app notification in top menu
* Add fullscreen modal
* Add notification modal and items
* Style items
* Toggle details of item
* Mark all read
* Add no results box
* wip specification for event api
* Add events table, query and index
* Send out events from WP notification mailer job
There we have the recipients present
* Add cleanup job for older events with a setting
* Hide bell notification when not logged
* Add specs for events API index/show
* Fix setting yml key
* remove pry in event creation
* Fix before hook in events API to after_validation
* Fix polymorphic association raising exception for aggregated journals
* Fix typo in read_ian
* Fix yml entry for mentioned
* Add read/unread post actions to event API and add specs
* Wire up API to frontend
* Fix order on events
* Switch to unread in notification
* Add event query
* rename WPEventService
* route wp mail sending over events
* rename spec methods
* author becomes watcher
* correct message call signature
* rename events to notifications
* renname parameter to reflect notification nature
* create author watcher for existing work packages
* Merge unreadCount from store
* Take a stab at polymorphic representers
* Fix link generation in polymorphic resources
For journals, no title is being generated however
* Fix frontend model for context
* Use timer for polling
* add notification_setting data layer
* Fix show resource spec
* Fix duplicate class in notification bell item
* Add minimal feature spec for notification
* API for notification settings
* Persist notifications
* adapt work package notification creation to notification settings
* extract notified_on_all
* consolidate wp#recipients
* concentrate wp notification in journal service
* simplify methods
* Remove unused patch endpoint
* Add specs for rendering and parsing notification settings
* Contract spec
* Update service spec
* adapt specs
* Angular notifications frontend
commit e29dced64699eb5f2443b9307c78343c9a58d1ee
Author: Wieland Lindenthal <w.lindenthal@forkmerge.com>
Date: Mon Jun 21 17:34:50 2021 +0200
Create Akita store and query for notification settings
commit 1a45c26c1a0c147d15393e49d2625aca4851a64d
Author: Wieland Lindenthal <w.lindenthal@forkmerge.com>
Date: Mon Jun 21 11:09:25 2021 +0200
Remove tabs from notificaition settings page
commit 0ea21e90c13a197f8bf2cfba1b60ddcff4e5e827
Author: Oliver Günther <mail@oliverguenther.de>
Date: Sun Jun 20 21:55:48 2021 +0200
WIP in app settings
* migrate notification data
* add project visible filter to project query
* Add inline-create and table display grouped by project
* Add notifications under admin/users
* Remove notifications partial
* Rename notififcations store to user preferences store
* Add setting for self_notified and hook that up to the backend
* Add aria-label to table checkboxes
* Restyle table and toolbar
* replace remains of mail_notifications attribute
* initialize notification settings for new user
* adapt my_preferences references
* reenable no self notified for documents
* adapt specs
* Avoid has_many :notifcation_settings
Rails magically autosaves the user's preferences when the user gets saved,
which somehow also tries to save the notfifications even when unchanged.
This breaks some specs such as the avatar upload spec. As we can't update the assocation
through rails anyway, just delegate to the user for reading instead.
* Restore update method of notification settings
* Restore update spec
* fix spec syntax
* lint scss
* linting
* Fix content_tag for bell icon
* Add feature specs for notification settings
* Disable ContentTag cop
* use visible filter to get projects for notification
The visible filter will reduce the project list down to the set of projects visible to the user provided as a parameter. This includes public projects.
* test for actual mail sending
* adapt me resource path
this.apiV3Service.users.me changed its type in 0d6c0b6bc7
* Implement changed migration
* Linting
* Add actor to notification representer
* Fix factory creating a duplicate WP journal
* Add work packages loading and journal details to notification entry component
* IAN basic facets, keep and expanded states.
* Fix notification bell spec
* Render body separately and add auto updating relative time
* Add fixedTime title
* Add actor to notification entry
* Fix clicking links on work package and project
* Tiny styling changes on entry row
* Disable count in notification if larger than 99 (wont fit)
* Introduce virtual scrolling to entry table
* allow delaying & prevent mail sending if ain read
Introduces a setting to delay mail sending after a journal aggregation time has expired. That way, users can confirm a notification in app. If they do before the delay expires, no mail is sent out additionally for that user.
* consolidate notifications (in&out) into shared admin menu
Co-authored-by: ulferts <jens.ulferts@googlemail.com>
Co-authored-by: Wieland Lindenthal <w.lindenthal@forkmerge.com>
* aggregate journals on write - simple implementation
* remove references to aggregated journals on read
* rewrite existing journals to be aggregated
* remove aggregated journal reference
* only delete predecessor if it can be aggregated
* fix aggregation condition
* adapt specs
* remove aggregated journal functionality from production code
The code is still necessary in a migration for the time being
* adapt specs
* use polymorphic belongs_to for journal data
The association can then be employed for eager loading
* eager load for activity rendering
* include custom message in membership forms
* keep pristine params to be able to pass it to the state
* fix indentation on projects api docs
* pass grape instance around in default endpoints
The grape instance has readily available access to all the objects (params, current_user) so less individual parameters need to be passed. This also avoids having to store the grape endpoint in a potentials not thread safe variable
* send custom message out on membership creation
* send custom message on membership update
* send custom message even if setting disabled
* restore params interface
* add custom message description to schema
* describe notificationMessage in the api documentation
* extract meta payload functionality into mixin
* ensure password in spec meets requirements
* Update docs/api/apiv3/endpoints/members.apib
Co-authored-by: Oliver Günther <mail@oliverguenther.de>
* Update docs/api/apiv3/endpoints/members.apib
Co-authored-by: Oliver Günther <mail@oliverguenther.de>
* Update docs/api/apiv3/endpoints/members.apib
Co-authored-by: Oliver Günther <mail@oliverguenther.de>
* Update docs/api/apiv3/endpoints/members.apib
Co-authored-by: Oliver Günther <mail@oliverguenther.de>
* Update docs/api/apiv3/endpoints/members.apib
Co-authored-by: Oliver Günther <mail@oliverguenther.de>
Co-authored-by: Oliver Günther <mail@oliverguenther.de>