25 Commits

Author SHA1 Message Date
Alexander Brandon Coles 5e9f3827f5 Freeze string literals in app/services
rubocop -A --only Style/FrozenStringLiteralComment,Layout/EmptyLineAfterMagicComment,Style/RedundantFreeze app/services
2025-07-18 17:45:24 +01:00
Christophe Bliard ef9791261c refactor: remove dead code and rename variable 2025-03-17 10:47:27 +01:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02: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 c750c06d43 disable sending notifications on project copy by default
With notifications now being sent for individual models as well, e.g. work packages, having the option enabled potentially leads to a quite a lot of notifications being created. Thus changing the default.
2023-03-06 16:46:44 +01:00
Christophe Bliard a06e519ed7 Set send_notifications only when not nil
When calling a service with `send_notifications: false`, the
`Journal::NotificationConfiguration.active?` will be set to `false` and
subsequent calls to set it to `true` will have no effect and log a
warning.

For this reason, it's better to use `nil` as default value for
`send_notifications` so that
`Journal::NotificationConfiguration.active?` is changed only when the
value is explicitly `true` or `false`, and ignored when the value is
`nil`.
2023-02-27 17:47:34 +01:00
Christophe Bliard 31725683a6 refactor: use keyword arg for send_notifications
This makes rubocop happier
2023-02-27 14:16:04 +01:00
Christophe Bliard 21a696ef9b Update copyright information for 2023 2022-12-30 15:51:26 +01:00
Oliver Günther a9157d644e Remove ShardState#rollback as its unused 2022-09-01 21:34:16 +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
Oliver Günther ccfa29c728 Move license and copyright docs to root, fix names and references 2021-09-02 21:50:46 +02:00
ulferts 6cda6ad4fd enforces dependent project modules being active (#9311)
Project modules, e.g. calendar can define dependencies, e.g. work packages. An error message is now displayed if a user enables a project module without the dependency being active in the project as well.

Also fixes a serious bug in the Shared::ServiceContext module. Whenever a failing service result is returned, every change to the database is to be rolled back. This was not true when a model was provided since the changes where carried out within an inner transaction
2021-05-25 14:26:16 +02:00
ulferts 6140f4c7e9 update copyright to 2021 (#8925)
Updates the copyright to 2021 for all files that have a copyright. Files in our source code without the copyright header still do not receive one automatically. Additionally, backlisted files are also excluded.

Previously the copyright of chiliproject which references redmine stated a copyright of redmine up to and including 2017 which is not true for the code we have in here. Because of that I changed that to 2013
2021-01-13 17:47:45 +01:00
Oliver Günther 530e9174b0 Add test for base callable service 2020-07-10 15:41:03 +02:00
Oliver Günther 01954c26bc Refactor copy services to use shared state 2020-07-10 15:41:03 +02:00
ulferts 67ade5002d extract journal notification setting to separate class 2020-05-06 10:46:25 +02:00
ulferts a895767619 have a delete service for attachments 2020-03-02 15:49:31 +01:00
ulferts 0cda1869a8 employ advisory lock for all update services 2020-03-02 15:49:30 +01:00
Henriette Dinger bd7f4e4814 Update copyright notice 2020-01-15 11:31:26 +01:00
Oliver Günther 6ef4211e77 Bump copyright to 2018 (#6171)
[ci skip]
2018-02-12 08:51:12 +01:00
Jens Ulferts a1812699f0 validate actions 2018-02-06 16:47:45 +01:00
Jens Ulferts 414212c49f handle multi select custom fields 2018-02-06 16:42:46 +01:00
Jens Ulferts 690e0ffc60 wp create/update/destroy via services 2017-11-29 15:27:29 +01:00