49 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 e1f5efcf71 manage has_comment 2026-02-25 16:00:15 +01:00
Ivan Kuchin 8ac973469b order attributes in custom fields base contract alphabetically (and remove duplicate) 2026-01-08 17:27:34 +01: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 38d5222c5b [#68700] replace score with weight
- add migration for db column name
- update AR relations in code
- update display texts and locale keys
- update test, method, class, variable names
- fix formatting mistake in item base controller
2025-11-03 13:58:05 +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 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 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
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
Tobias Dillmann fb60aabbe4 [#64347] introduce formula field to custom field admin views 2025-06-25 10:13:10 +02: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
Marcello Rocha 4fe10f03b4 Updates the contract to deal with missing a short key 2024-11-05 10:39:18 +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
Marcello Rocha df8802d43a Updates components and controller to deal with turbo updates and navigation down the tree
Fix a bug when returning errors on the form

Allows editing deeply nested items.

Moves edit to work with only turbo frames

Remove unused parameters
2024-10-29 11:28:00 +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 afab498a8c [#57816] final polishing
- removing ineffective system arguments
- add i18n support for validation messages
2024-10-10 13:11:31 +02:00
Eric Schubert 996bb65e73 [#57816] added turbo streams to update the forms
- render hierarchical item in component
- add missing routes
- localize dry-validation error
2024-10-09 17:33:54 +02:00
Andreas Pfohl c20dc554ad [58105] Fixed suggestions from PR 2024-10-08 11:13:58 +02:00
Andreas Pfohl 26c8e4889c [58105] Added generate_root and insert_item to HierarchicalItemService 2024-10-02 14:16:46 +02:00
Andreas Pfohl c29029e0d8 [58105] Added HierarchyItemService with initialize contract 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
Dombi Attila 82d492a2d7 Update specs 2024-08-07 15:38:27 +03:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
ulferts ed4d105c1e Merge remote-tracking branch 'origin/dev' into epic/49688-individuelle-gruppen-für-projektattribute 2024-01-04 15:36:30 +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
Jonas Jabari a01a6b581d Merge branch 'dev' into epic/49688-individuelle-gruppen-für-projektattribute 2023-11-28 15:16:49 +01:00
Jonas Jabari 029c655b7f refactored datamodeling, reuse custom field forms in new project attribute context 2023-11-24 14:51:25 +01:00
Richard "Virgo" Richter d646464fcf Feature 50526, support for non-open versions in version custom fields
- adds `allow_non_open_versions` boolean flag/column for CFs
- this option is available for CFs of type Version
- when enabled, edit offers also locked and closed versions as values
2023-10-19 12:37:24 +00:00
Christophe Bliard 21a696ef9b Update copyright information for 2023 2022-12-30 15:51:26 +01: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 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 41f8dbaff2 Refactor custom fields into services 2020-09-03 09:08:40 +02:00