59 Commits

Author SHA1 Message Date
Ivan Kuchin 0f7b6be8ae allow deleting calculated value custom fields without enterprise token 2026-05-19 17:42:43 +02:00
Ivan Kuchin b648341030 [#74768] Remove calculated_value_project_attribute feature flag
https://community.openproject.org/wp/74768
2026-05-19 17:42:42 +02:00
ulferts 64609c8ae8 remove ability of boolean cfs to be required 2025-12-17 13:41:57 +01:00
Dombi Attila 47af87af4b Move the calculated custom field calculations to a background job. 2025-11-06 09:09:47 +02:00
Eric Schubert d9a8aef713 [#68700] fix unit tests
- replaced images
- added enterprise addon for test setups
2025-11-03 17:21:32 +01:00
Yauheni Suhakou 6e739a805c Rename files "scored" to "weighted" 2025-10-31 14:37:06 +01:00
Yauheni Suhakou 0de0713a53 Big rename
Renames `scored_list` to `weighted_item_list`
2025-10-30 15:36:55 +01:00
Eric Schubert deaec0c8a5 [#67623] remove feature flag for weighted item list
- https://community.openproject.org/wp/67623
2025-10-30 15:07:02 +01:00
Eric Schubert 7845b35cb3 [#67973] update insert contract to behave like update 2025-10-08 11:40:41 +02:00
Eric Schubert 29e51b6909 [#67973] change contract behaviour for list items
- https://community.openproject.org/work_packages/67973
- changed keys to be mandatory
  - short is now nilable string
- do not remove nil values from hashes in persistence service
2025-10-07 16:51:12 +02:00
Ivan Kuchin 281430a2d5 add enterprise guard to create and update custom field contracts 2025-09-24 19:25:04 +02:00
Jan Sandbrink 389835e6bf Fix translation of dry validation contracts
Sometimes dry-validation would overwrite our custom english
messages with its default messages, recognizable by lacking a
dot at the end.

By using our own top_namespace AND ensuring that dry doesn't load
its own translations, this could be fixed. It means that we will have
to define all messages ourselves, we can't rely on default translations.
2025-09-09 15:58:30 +02:00
Ivan Kuchin daa840c078 Merge pull request #20020 from opf/implementation/64528-recalculate-when-a-factored-in-cf-is-deleted-in-the-administration
Implementation/64528 recalculate when a factored in cf is deleted in the administration
2025-08-27 19:12:30 +02:00
Eric Schubert 8eb52dbd40 [#66412] skipped flaky locale tests 2025-08-26 14:52:55 +02:00
Eric Schubert 52d0fdfc61 [#66412] fixed method signature is controller 2025-08-26 14:25:11 +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
Eric Schubert 20d427954d [#66412] amend persistence layer to handle item scores
- https://community.openproject.org/work_packages/66412
- add contracts for scored items
- add parameter to choose contract for persistence service
- add unit tests
2025-08-26 11:42:01 +02:00
Ivan Kuchin 870658c82b custom field delete service and contract (error with links if referenced in calculated value fields) 2025-08-25 20:11:11 +02:00
Eric Schubert be7b7f35fa [#66410] add common denominator for hierarchical lists
- use better interpolated failure message in contract
2025-08-20 15:53:05 +02:00
Eric Schubert 97f14394b9 [#66410] added new custom field type scored list
- https://community.openproject.org/work_packages/66410
- works under the hood for now exactly like hierarchy
- added feature flag
2025-08-19 16:17:19 +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
ulferts 1e0043671e remove puts statement 2025-03-24 10:35:56 +01:00
Eric Schubert 01f5cb131e [#59866] fixed update contract
- https://community.openproject.org/work_packages/59866
- skip uniqueness check for short if short is deleted
2024-12-05 16:13:27 +01:00
Eric Schubert d3f6955b7f [chore] reset i18n config after test run 2024-11-15 10:55:39 +01:00
Eric Schubert f46f7d04d4 [chore] make flickering disappear
- use test locale for localisation specs to avoid errors due to lazy
  i18n loading
2024-11-15 10:27:39 +01:00
ulferts 5e17d9a3c8 fix spec expectation - different spelling 2024-11-15 09:29:51 +01:00
Andreas Pfohl 2f06714bb3 [58857] Added specs for hierarchy items API and representer
- Added request specs for /api/v3/custom_field/{id}/items
- Added request specs for /api/v3/custom_field_items/{id}
- Added request specs for /api/v3/custom_fiels_items/{id}/branch
- Added representer specs for HierarchyItemRepresenter
- Make shift repair of Dry::Validation::Contract english localization
2024-11-13 11:09:51 +01:00
Eric Schubert cdd8c16e5b [chore] enable contract localization test 2024-11-12 13:29:21 +01:00
Marcello Rocha cd9b5cd14d Update the contracts to handle unique shorts and also I18n error messages 2024-11-04 17:42:24 +01:00
Bruno Pagno 6fceb39199 fix label check when not changing the label 2024-10-25 16:38:46 +02:00
Marcello Rocha 9670a166e7 Remove instance variable, adds some docs, wraps some return values. 2024-10-16 19:06:20 +02:00
Marcello Rocha 80edc9e04b Update specs, contracts, draft inplementation of the missing actions 2024-10-15 18:28:20 +02:00
Marcello Rocha 160b3e6032 Clean up some contracts adds get_branch
# Conflicts:
#	app/contracts/custom_fields/hierarchy/insert_item_contract.rb
#	spec/contracts/custom_fields/hierarchy/insert_item_contract_spec.rb
2024-10-15 16:46:03 +02:00
Andreas Pfohl 4cacf470ce [58105] Added update_item and delete_branch methods to HierarchicalItemService 2024-10-15 16:44:39 +02:00
Eric Schubert ce24b63acf [#57816] disabled locale spec temporarily 2024-10-15 11:10:19 +02:00
Eric Schubert 79287943d7 [#57816] added contract test with localized error validation 2024-10-11 16:05:08 +02:00
Eric Schubert 561e2a5566 [#57816] fixed contract unit test 2024-10-11 13:10:42 +02:00
Andreas Pfohl 26c8e4889c [58105] Added generate_root and insert_item to HierarchicalItemService 2024-10-02 14:16:46 +02:00
Kabiru Mwenja 179829e4df fix[Op#57579]: stick to select_custom_fields perm check
Removes the admi only guard as it's possible project admins (who are'nt admins) can modify
custom field activations at project level. Hence restricting to just admins does not make sense
2024-09-10 17:20:12 +03:00
Kabiru Mwenja 6b94d1f1f3 chore[Op#57579]: Require admin for CF activation 2024-09-10 17:20:12 +03:00
Kabiru Mwenja aa573fe881 feat[Op#57579]: Define CF activation contract
FIXME: Clarify whether visibility is relevant when activating custom fields
2024-09-10 17:20:12 +03:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
jjabari-op b4590b4f64 Merge branch 'dev' into epic/49688-custom-set-of-project-attributes-grouped-in-sections 2024-03-21 05:21:28 +01:00
Dombi Attila 4d93ce97f9 Display error messages for missing custom field section on creating project custom fields. 2024-03-20 21:14:03 +02: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
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