Commit Graph

59 Commits

Author SHA1 Message Date
Oliver Günther 712731ca73 Render link warning 2026-01-28 13:51:53 +01:00
Mir Bhatia 103ce1b468 Add and fix specs 2025-11-25 09:02:11 +01:00
Marcello Rocha 01a7aa12cd [66939] Failed update re-rendered the entire component (#20065)
* Make the render a stream update

* Disable rubocop for the update action

* Updates test
2025-08-29 14:16:57 +02:00
Eric Schubert c6ad2c3c8f [#66412] fixed test setup
- use new interface of persistence service
- use correct spec helper
2025-08-26 13:18:47 +02:00
ulferts d6caec6c55 only display hierarchy option in dropdown if ee permits 2025-06-23 12:00:35 +02:00
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
Bruno Pagno 509e6da4d2 handle new_sort_order parameter more elegantly 2024-11-01 14:09:07 +01:00
Bruno Pagno 69755e2b6b use post instead of put for reordering hierarchy items 2024-11-01 14:09:06 +01:00
Bruno Pagno 5a4abf702b reorder up and down actions 2024-11-01 14:09:02 +01:00
Bruno Pagno b4c425ee70 include specs for hierarchy/items_controller 2024-10-29 22:33:51 +01: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
Christophe Bliard a3a221fdaa Fixes from PR review
Co-authored-by: Aaron Contreras <aaronlcaq@gmail.com>
2024-09-13 08:35:26 +02:00
Christophe Bliard edc1d1843a Move progress tracking fields in dedicated admin page 2024-09-04 15:00:27 +02:00
Christophe Bliard e4e18cdf6c refactor: use shared_examples instead of obscure method
I did not understand what `require_admin_and_render_template` was
supposed to do. I thought it was creating some initial user and
rendering the template as a before action, but actually it only adds
some examples.

Using RSpec shared examples makes intent clearer.
2024-09-04 14:45:31 +02:00
Christophe Bliard aea93c6835 refactor: Rename WorkPackageSettingsController to WorkPackageGeneralController 2024-09-04 14:21:10 +02:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Christophe Bliard b5b0c411bf Remove days per month and days per week from admin
The days_per_month setting is kept as it is also used in the frontend,
and could be useful if some people input months as durations.

The rest has been removed and can be easily retrieved from source
history.
2024-06-10 12:11:28 +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
Aaron Contreras 0be7415a81 Rename WorkingDays constant and route to WorkingDaysAndHours 2024-05-14 15:31:24 -05: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 b47a16b788 Merge branch 'dev' into feature/40749-consistent-calculation-of-percent-complete 2024-04-10 16:47:20 +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
Dombi Attila 35783e1d2f [#51793] Split existing project administration settings into multiple pages
https://community.openproject.org/work_packages/51793
2024-04-09 11:42:12 +03: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
Mir Bhatia 519c9ce046 Add rubocop overrides 2023-07-21 12:36:37 +02:00
Mir Bhatia 0d32ee938d Refactor require_admin tests 2023-07-14 10:42:40 +02:00
Mir Bhatia 0e7dcb4aa0 Add require_admin tests for all remaining settings 2023-07-03 12:53:20 +02:00
Mir Bhatia 083ce060cf WIP: Add general_settings_controller_spec 2023-06-30 15:33:13 +02:00
Mir Bhatia 10e5a523e1 Add icalendar_settings_controller_spec 2023-06-30 14:50:05 +02:00
Mir Bhatia 6888af6019 WIP: Add icalendar_settings_controller spec 2023-06-27 20:36:27 +02:00
Mir Bhatia 3f0926ea1c Update field instruction links for cal settings 2023-06-23 14:53:04 +02:00
Mir Bhatia 581a588b33 Merge branch 'dev' into implementation/48379-rename-working-days-and-add-second-level-of-navigation 2023-06-19 14:23:32 +02:00
Christophe Bliard 8e2abcba65 Merge pull request #12839 from opf/bug/41275-perform-language-reset-on-setting-save
[#41275] Perform default language reset on saving language settings
2023-06-19 14:16:30 +02:00
Aaron Contreras c1b4b2a962 Use Settings::LanguageUpdateService in LanguagesSettingsController
Updates the `LanguageSettingsController` to use the new `LanguageUpdateService`
which handles forcing the default language on users with an unavailable language
set.

There were no controller specs, so adding one in.
2023-06-19 13:44:21 +02:00
Christophe Bliard 48d4e93d98 Merge pull request #12838 from opf/fix/restore_registration_footer_setting_in_admin
Restore some authentication settings in admin
2023-06-15 14:04:45 +02:00
Christophe Bliard b771e2a150 Remove useless code 2023-06-15 13:39:54 +02:00
Aaron Contreras 34d039c945 Use Settings::LanguageUpdateService in LanguagesSettingsController
Updates the `LanguageSettingsController` to use the new `LanguageUpdateService`
which handles forcing the default language on users with an unavailable language
set.

There were no controller specs, so adding one in.
2023-06-13 08:29:37 -05:00
Aaron Contreras 2378e5f413 Refactor and clean up project_settings_controller_spec
Some Rubocop warnings and unnecessary setup/teardown code deserved some cleanup
2023-06-13 08:29:37 -05:00
Christophe Bliard 63a05f6307 No need to restore settings after test
Settings are saved in database. Database is restored to previous state
before each test, so settings are restored too.
2023-06-13 11:16:11 +02:00
Christophe Bliard c0a45951f1 Restore some authentication settings in admin
Also makes ckEditorAugmentedTextarea read-only if the wrapped text area
is disabled.

As for the invitation_expiration_days setting, commit 269f9416dd and
commit 286d862c38 got intertwined with merge commit eb63698a3d, and
resulted in hiding the setting when
`OpenProject::Configuration.registration_footer` is set.

As for the registration_footer setting, PR #6321 intent was to prevent
modifying it if it was already set via env var or configuration file.
When `OpenProject::Configuration` and `Settings` were merged, this code
was not updated. With the default value being non-blank, it lead to
hiding the setting from the administration pages.

This commit restores both settings.
2023-06-12 16:22:11 +02: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
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