39 Commits

Author SHA1 Message Date
Tomas Hykel 008f39b7f4 Revert "[STC-356] Disallow setting journal aggregation period to >2 hours"
This reverts commit 75de0dbcd2.
2026-06-12 15:36:40 +02:00
Tomas Hykel 75de0dbcd2 [STC-356] Disallow setting journal aggregation period to >2 hours 2026-06-12 15:31:55 +02:00
Oliver Günther fa36f1a098 Disallow writing of sendmail settings 2025-12-02 09:46:15 +01:00
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
Jan Sandbrink 40aff02f11 Remove params argument from BaseCallable#perform
This is making the interface of BaseCallable more consistent.
Previously it was unclear, whether the params passed to perform
should be used to reference parameters or whether the attribute accessor
should be used. Different code used different approaches.

To apply this change more consistently, BaseContracted also removed
params from the methods called inside its own perform method, e.g.
before_perform or after_validate.

At a later point we might consider removing this argument from other large
inheritors as well, for example `BaseServices::SetAttributes#set_attributes`.
2025-06-30 11:47:03 +02:00
Ivan Kuchin 6e2d662119 enque both ApplyWorkingDaysChangeJobs 2025-06-04 18:33:20 +02:00
Christophe Bliard 447a6deafe Fix rubocop warnings Metrics/AbcSize and Metrics/PerceivedComplexity 2024-09-25 14:00:04 +02:00
Aaron Contreras 2f2561c08f Add in simple average calculation mode job
* Adds temporary depth table - Could be cleaned up down thie line with
  the `work_package_hierarchies` table.
2024-09-24 16:35:58 -05:00
Aaron Contreras 6cbfdc8e78 Trigger the recalculation job when changing to work weighted mode
* Triggers job
* Adds journal entries with specs and translations
2024-09-24 11:10:22 -05:00
Ivan Kuchin bca7db9398 update copyrights 2024-07-31 15:02:50 +02:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Christophe Bliard 5e4766f072 Merge branch 'dev' into feature/49409-status-exclude-from-totals 2024-06-03 17:56:41 +02:00
Aaron Contreras b600e76244 Sync days_per_week and days_per_month on client side 2024-05-24 11:44:26 -05:00
Aaron Contreras 102b0cc252 Make hours/day, hours/week, days/month configurable 2024-05-24 11:44:25 -05:00
Christophe Bliard 6b4c0dccf2 [49409] Handle excluded statuses from totals in update job
The job has been updated to excluded work packages having a status with
`excluded_from_totals` set to true. The journal entry has valid values
so that the cause renders correctly.

The job is not yet triggered properly when the "excluded from totals"
attribute of a status is changed in the administration.
2024-05-15 12:35:47 +02:00
Christophe Bliard 708aaba387 [54646] Remove totals of childless work packages in a migration
https://community.openproject.org/wp/54646

A concurrency key has been set on all jobs updating progress values to
ensure that only one job is performed at a time.

All classes related to managing progress updates in jobs has been moved
to a specific folder.
2024-05-06 11:48:05 +02:00
Christophe Bliard e15e00db1d Update work packages when changing to status-based mode
https://community.openproject.org/wp/40749
2024-04-09 19:18:43 +02: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
Aaron Contreras 6333b2f766 Rename language reset method/Re-work spec file
Thanks Christophe!
2023-06-13 08:40:31 -05:00
Aaron Contreras ded5a5d4fa Create Settings::LanguageUpdateService
Extends the base Settings::UpdateService in order to force the default
language on users whose current language setting wasn't available (or not
available anymore after the service's run).

Some spec factoring fit quite nicely here to extract the shared setup code
into a shared context.
2023-06-13 08:29:37 -05:00
Behrokh Satarnejad 30ce7a915d [45001] Create a new component to show the list of non-working days of a year (#11718)
* create a new component for showing list of NWD

* fix the method for fetching data from the database

* fix eslint errors

* add delete icon to the list of non-working days

* Change componenet name and add empty state handleing and add button for opening the date picker modal

* fix full calendar/list css import issue in anguar 14

* change confirm modal to show a list of data and a warning

* open confirmation modal in list of non-working days component while submitting the form

* format removed dates to be shown on the confirmation modal

* change a warning string

* make a connection between rails and calendar list component

* reinstall list in fullcalendar

* fetch data from non-working days API endpoint

* set suto to content height of calendar

* use id returned from the API

* Fix parameter name on WorkingDaysSettingsController

* Fix non working days attributes _deleted to _destroy

* Pass ruby variable to the op-non-working-days-list component

* fixup! Pass ruby variable to the op-non-working-days-list component

* Pass this.modifiedNonWorkingDays to the angular component

* add inputs to the form itself instead of row of calendar, while adding a new NWD

* Update the modified_non_working_days variable to also propagate the _destroy field to the frontend

* create hidden inputs only for added and deleted NWDs

* Fix specs

* Limit json attributes

* add non-working days as test

* add hidden inputs for a new nwd in ngoninit and add it to the calendar itself at the same time, when it is back from a failed proces

* add a method to check if a date is a NWD

* Add requests spec for deleting non working days

* Allow dangling underscore for _destroy

* fixup! Allow dangling underscore for _destroy

* WIP single date picker

* Use slots from single datepicker to wire up modal

* Add spec to add a NWD

* remove Non-working days only toggle

* WIP

* Add required validation

* show asterisks beside date in date-picker

* test if date ans name are entered then close the datepicke

* Add error when already added

* Rewrite into less implicit created elements

---------

Co-authored-by: Dombi Attila <83396+dombesz@users.noreply.github.com>
Co-authored-by: Oliver Günther <mail@oliverguenther.de>
2023-02-06 20:01:16 +01:00
Dombi Attila b0c02dced7 Update the Settings::WorkingDaysUpdateService to schedule the WorkPackages::ApplyWorkingDaysChangeJob on a successful settings change 2023-01-13 10:35:07 +02:00
Dombi Attila 15ad45b17a Remove the Settings::Definition on_change callback as it is not neccessary anymore 2023-01-13 10:35:07 +02:00
Dombi Attila 685b8226de [#45339] Modify the backend to support saving the non working days
https://community.openproject.org/work_packages/45339
2023-01-09 14:55:37 +02:00
Christophe Bliard 21a696ef9b Update copyright information for 2023 2022-12-30 15:51:26 +01:00
Christophe Bliard 4d93d4ef91 Adapt job call to pass previous working days 2022-09-22 11:30:02 +02:00
ulferts c6d9111b1b add an on_change callback to Setting to trigger background job 2022-09-22 10:01:44 +02:00
ulferts 3e3df2e80d trigger working days update job after setting change - dirty 2022-09-22 10:01:43 +02:00
Dombi Attila bb107a7223 [#43819] Basic administration for non working days (excluding danger zone)
https://community.openproject.org/work_packages/43819

WorkingDays as Setting
2022-09-12 21:10:10 +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
Oliver Günther 34f8e9dff8 Validate admin guard for all settings writers (#9012)
* Validate admin guard for all settings writers

* Add spec to test access to all links under admin

* Fix broken specs

* Keep only UpdateContract and add spec

* Move admin settings under their own namespace for clarity

Move all admin related settings under ::Admin::SettingsController

* Fix more paths and views for settings

Adds another spec to ensure all links in admin can be viewed by admin

* Fix wrongly changed settings path for repositories page

* Use plugin name for plugin settings
2021-02-22 20:46:27 +01: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
Henriette Dinger bd7f4e4814 Update copyright notice 2020-01-15 11:31:26 +01:00
Henriette Dinger 450cc3d63e Create new admin menu node "Backlogs" 2019-07-04 10:33:55 +02:00
Henriette Dinger 654ebfddd8 Move authentication settings tabs as separate page to new menu node 2019-07-03 15:51:13 +02:00