53 Commits

Author SHA1 Message Date
Jan Sandbrink 0b87e7543f Freeze string literals in specs
Rolling out frozen string literals further by freezing all
string literals in core specs.
2025-05-05 09:29:55 +02:00
Kabiru Mwenja 1cf2bb4f17 Dispatch immediate email reminder based on user preference 2024-12-17 15:10:37 +03:00
Christophe Bliard 8567cedb0c [57932] Add spec for resending email logic 2024-10-02 16:02:27 +02:00
Oliver Günther 9586b06db3 Merge pull request #16331 from opf/chore/verify_partial_doubles
Set verify_partial_doubles=true
2024-08-06 10:54:18 +02:00
Oliver Günther 1df0c00c2a Adapt affected specs to opt-out of double verification 2024-08-05 19:31:30 +02:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Ivan Kuchin 0b87ed9b6a remove newlines from context descriptions 2024-07-29 19:27:17 +02:00
ulferts 3b2121f733 Revert "Merge remote-tracking branch 'origin/release/13.4' into dev"
This reverts commit 40b2bbeb09, reversing
changes made to b4c6cb17cc.
2024-03-21 11:31:17 +01:00
Ivan Kuchin 7787e457a3 Revert "Merge branch 'dev' into release/13.4"
This reverts commit a901541269, reversing
changes made to e573ca00b7.
2024-03-20 20:19:08 +01:00
Ivan Kuchin 9e4934cd0a change quotes using rubocop --only Style/StringLiterals,Style/QuotedSymbols -a 2024-03-20 18:05:22 +01:00
Christophe Bliard 8fa8584538 Run rubocop --autocorrect on all files
Only the safe cops have run. rubocop version is 1.59.0.
2024-01-05 15:27:09 +01:00
Christophe Bliard c795874f7f Update copyright year for 2024
command used: `rg -l 'Copyright \(C\) 2012-202\d the OpenProject' | xargs -n 100 sed -i -r 's/Copyright \(C\) 2012-202. the OpenProject/Copyright (C) 2012-2024 the OpenProject/'`
2024-01-02 16:23:54 +01:00
ulferts 84995eaf4f rename member "of" scopes 2023-11-20 18:40:42 +01:00
Aaron Contreras c1e79db06b Enqueue emails for Group shares 2023-10-16 09:47:00 -05:00
ulferts 2b2abf864a introduce ProjectRole model 2023-10-09 14:34:20 +02:00
Aaron Contreras d3d39adc74 Create WorkPackageSharedJob to enqueue emails 2023-09-27 09:48:52 -05:00
Christophe Bliard 4c2a9d0aa8 Enable RSpec zero monkey patching mode
The plan for RSpec 4.0 is to disable monkey patching.

See https://github.com/rspec/rspec-core/blob/main/features/configuration/zero_monkey_patching_mode.feature for details.
2023-05-31 19:22:29 +02:00
Christophe Bliard aa23106c11 lint: autocorrect RSpec/FactoryBot/ConsistentParenthesesStyle
command is

    rubocop -A --only RSpec/FactoryBot/ConsistentParenthesesStyle modules spec
2023-03-07 15:04:32 +01:00
Christophe Bliard 21a696ef9b Update copyright information for 2023 2022-12-30 15:51:26 +01:00
Dmitrii 0c85cc4287 [#43675] fix specs 2022-09-27 22:22:24 +02:00
Dombi Attila bd9cb9ef67 Fix error on Mails::WatcherJob missing notification_settings 2022-09-26 17:07:06 +02:00
Christophe Bliard e160ba0555 Fix spec path to end with *_spec.rb 2022-06-03 09:51:24 +02:00
Christophe Bliard 48a4f1b6ad lint with rubocop --autocorrect (safe cops only) 2022-06-02 10:40:10 +02:00
Christophe Bliard a33524ef6d remove ruby magic comment for utf-8
ruby interprets source encoding as utf-8 since 2.0.0, making magic comment redundant and useless
2022-03-10 19:36:58 +01:00
Christophe Bliard bc8d423ec2 update copyright information for 2022 2022-03-01 17:05:59 +01:00
Christophe Bliard ed3aa3f598 rename Mails::MemberRolesDiff as Members::RolesDiff
applicability is not only limited to emails, hence mving it to models makes more sense.
2022-02-07 11:26:12 +01:00
Christophe Bliard af5c4739b8 Merge branch 'dev' into feature/40546-global-roles-for-groups 2022-02-04 08:48:31 +01:00
Christophe Bliard 47a297daae Fix argument alignment since f08bea3467 (#10129)
* Fix argument alignment since f08bea3467

The FactoryBot.* prefix has been removed in f08bea3467. Since then
rubocop complains about Layout/ArgumentAlignment. This commit fixes it.

* do not fix alignments for modules/*/spec yet

hoping to be under the limit of 65535 characters for reviewdog to report on rubocop errors
2022-02-02 21:48:06 +01:00
Christophe Bliard 632e1f7ec3 Make rubocop happier
Remove the 'FactoryBot.'
2022-01-31 09:32:49 +01:00
Christophe Bliard 30efbe426d send emails when adding global role to a group
Also refactor the logic to decide if a 'membership created' or 'membership updated' email should be sent
2022-01-31 09:32:46 +01:00
Oliver Günther f08bea3467 Remove FactoryBot.* prefix where applicable 2022-01-25 08:19:06 +01:00
ulferts ebc25fd7cc check visibility on notifications
For now, the implementation is work package specific
2021-11-04 13:55:19 +01:00
ulferts e07cb5f6c1 prevent being self notified on member manipulation 2021-10-05 17:33:10 +02:00
ulferts aff788bdf6 Merge remote-tracking branch 'origin/dev' into implementation/38884-notifications-send-out-mention-mail-on-mentioning 2021-10-01 11:39:21 +02:00
ulferts 0717357d31 linting 2021-09-30 12:59:26 +02:00
ulferts 672a5c79b6 consolidate work package mailing 2021-09-30 12:59:26 +02:00
Oliver Günther 5e8d9867c1 Remove all option in watcher job spec 2021-09-29 09:35:46 +02:00
Oliver Günther dc7b0ff99f Remove channel from member_job 2021-09-28 22:02:00 +02:00
Oliver Günther 528ca50faa Strip sent_mail into two columns mail_alert_sent and mail_reminder_sent 2021-09-28 22:01:59 +02:00
Oliver Günther 208c8365eb Remove more channel settings in specs 2021-09-28 22:01:59 +02:00
Oliver Günther 5b8df97498 Rename read_mail_digest into sent_mail and merge with non-wp items 2021-09-28 20:38:19 +02:00
Oliver Günther b9832b359a Linting 2021-09-27 14:52:47 +02:00
Oliver Günther 202e2f31e6 Fix disabling of member notifications when setting is false 2021-09-27 10:55:27 +02:00
Oliver Günther 612572190a Remove notified events 2021-09-27 10:55:26 +02:00
Wieland Lindenthal a701a6bdc2 Rename 'digest' to 'reminder', first chunk. Not touching Notification yet 2021-09-08 09:47:56 +02:00
Oliver Günther ccfa29c728 Move license and copyright docs to root, fix names and references 2021-09-02 21:50:46 +02:00
ulferts 1f024e5796 remove no_self_notified user preference 2021-08-23 20:12:15 +02:00
ulferts 63ad2e8dd1 Generate IAN near real time (#9570)
* 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
2021-08-23 15:25:47 +02:00
ulferts 75bb809ad6 Feature/1899 send daily email summaries (#9430)
* email digests

* use time for notification digest setting

* safeguard against empty digest
2021-07-14 16:54:17 +02:00
Oliver Günther 9636a08988 [26688] In-app notifications (#9399)
* 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>
2021-06-24 14:03:29 +02:00