36 Commits

Author SHA1 Message Date
Alexander Brandon Coles 0091ee164d Freeze string literals in app/contracts
rubocop -A --only Style/FrozenStringLiteralComment,Layout/EmptyLineAfterMagicComment,Style/RedundantFreeze app/contracts
2025-07-18 17:51:41 +01:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +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 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
Klaus Zanders 2d5f5f3a26 Replace allowed_to_globally? -> allowed_globally? for global permission checks 2023-10-23 15:05:37 +02:00
Klaus Zanders f64fde1c15 Fixes Performance/StringReplacement offenses 2023-09-06 13:08:22 +02:00
Klaus Zanders a55b77207e Fixes Performance/EndWith offenses 2023-09-06 10:59:35 +02:00
Christophe Bliard 21a696ef9b Update copyright information for 2023 2022-12-30 15:51:26 +01:00
Dombi Attila d349c30d7e [#44414] Add the Enterprise Edition guard on date alerts settings
https://community.openproject.org/work_packages/44414
2022-11-08 21:50:47 +02:00
Christophe Bliard 75f272504a Change NotificationSettings duration units to days
Days are easier to work with than hours when building SQL requests.

Also change "everyday" value for overdue from 0 to 1, for consistency
with the other values.
2022-10-28 15:53:20 +02:00
Dombi Attila bbcfcf26be [#43673] Include date alert into NotificationSetting api specs
https://community.openproject.org/work_packages/43673
2022-10-18 13:24:55 +03:00
Dmitrii 00a0d42ed1 [#43673] fixes after comments 2022-10-12 21:24:04 +02:00
Dmitrii ac1d98ea03 [#43673] move validation to contract 2022-10-12 20:14:47 +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
Oliver Günther e54ec53b13 Use UserPreferences::SetAttributes in Users::SetAttributes 2021-11-18 21:32:57 +01:00
Oliver Günther e3b44b5614 Fix error key for presence 2021-10-12 13:34:58 +02:00
Oliver Günther 4eab82fa03 Add feature spec for settings 2021-10-12 09:58:19 +02:00
Oliver Günther 68d6b44635 Pause reminders functionality 2021-10-11 20:47:49 +02:00
ulferts 3e0cc5df02 compare to tzinfo time_zones in reminder mail 2021-10-05 14:46:05 +02:00
ulferts ac9bdb7d29 move tz valid values to contract 2021-10-05 14:46:04 +02:00
ulferts 71574a738b store tzinfo time zones 2021-10-05 08:50:28 +02:00
Oliver Günther 11b6df76af Review feedback 2021-10-04 08:46:22 +02:00
Oliver Günther 56e53620cb Remove type from schema in favor of better type check in contract 2021-10-04 08:46:22 +02:00
Oliver Günther 8dec991d01 Remove channel from non-wp PR 2021-09-28 22:01:59 +02:00
Oliver Günther 7908c7eebe Validate a separate params contract 2021-09-27 10:55:26 +02:00
ulferts 48292af26d limit reminder times to full hours
The UI already limits the times a daily reminder can be configured to be delivered to be a full hour but a different client could specify a different value which the job delivering the reminders will not support
2021-09-13 11:11:33 +02:00
ulferts 23a8bef352 Merge pull request #9629 from opf/fix/copyright-file
Move license and copyright docs to root, fix names and references
2021-09-08 08:49:31 +02:00
ulferts cb989527fe move user preference validations to contract 2021-09-03 10:27:20 +02:00
ulferts f8c3f8f6b6 proper schema extension by plugins 2021-09-03 10:27:20 +02:00
ulferts 0cee545248 adapt the json_validator from activerecord_json_validator
The error messages need to be more fine grained than what can be achieved with the original gem
2021-09-02 22:31:40 +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
Oliver Günther 1e4d67b3eb Validate daily reminder preferences with a JSON schema 2021-08-30 20:59:03 +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