150 Commits

Author SHA1 Message Date
Behrokh Satarnejad a60334373f Updates the work package type form configuration labels to use the
Figma terminology
2026-05-29 12:25:00 +02:00
Behrokh Satarnejad 5f0c53c0cd Change translation strings for groups 2026-05-29 11:00:31 +02:00
Behrokh Satarnejad dbef4d9e71 [74931] Show type of field beside the attribute (#23205)
* Show filed type beside its name

* Add feature spec

* Add a comment for field_type_label

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Add custom field type label assertion to feature spec

* Move custom field to active group before asserting type label

* Rename the displayed field format value from field_type to
field_format_label and reuse CustomFieldsHelper for custom field format
labels.

* Make the table configuration modal wait more and embedded work package table loading take longer to avoid flaky failures when the modal or embedded table is still refreshing in CI

* Undo changes for switch_to method

* Undo changes for the tests that are sometimes failing on CI

* Update spec/features/types/form_configuration_spec.rb

Co-authored-by: Henriette Darge <h.darge@openproject.com>

* Update spec/helpers/types_helper_spec.rb

Co-authored-by: Henriette Darge <h.darge@openproject.com>

* Rubocop errors fixed

* Fix flaky field format labels spec by revisiting page after custom field creation

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Henriette Darge <h.darge@openproject.com>
2026-05-27 09:24:38 +02:00
Behrokh Satarnejad d924c255cf [69524] Primerize Types form configuration page (#22854)
* Create the section component

* Create the form configuration component

* Create a controller

* change form template

* Use primer dialog for reset to defaults button

* show WP configuration modal while creating a related WPs table

* Fix the drag and drop functionality without save button

* Fix renaming functionality

* Use generic drag and drop in form configuration and move all client side action handling to server side

* Fix embedded query form configuration regressions

* Add data test selectors to all elements that we used for test

* update the current tests with the new implementations and design

* Add new tests for new controller of sections and rows

* WP quesry row should only have edit quesry action

* Update transformer spec regarding the new changes

* Fix the failing test in reset form configuration and some tests for actions

* Fix rubocop errors

* Fix eslint errors

* Add spec for removing a section

* Use condensed border boxes

* fix failing specs

* fix failing specs

* Switch the buttons in form configuration component

* Create the section at the top of the list

* Instead of using UUID, use the name of the group as the key

* Add missing check for EE for section actions

* Remove angular components

* Use action list instead of a border box for left side panel

* Reduce the margin between the right side panel and sub header, add some space to the query table left side, span to the whole available space

* Show validation errors while updating and creating a section

* Use a danger dialog for reset to default

* Add a confirmation for removing the section

* Align items in the row

* Use test_selector instead of data-test-selector

* Create move_action in rb file

* Create move_action in rb file

* Simplify section component

* Simplify form configuration component

* Remove dialog for rename and delete section on missing EE

* Create a component for inactive attribute list

* Create a separate component for reset dialog

* Remove EE feedback dialog

* Remove form partial which is not needed anymore

* Remove unused js strings

* Update using update_via_turbo

* Remove form configuration rows controller

* Create a blanksalte component

* Fix failing specs

* Fix failing specs

* Fix failing specs

* Remove unused translation strings

* Align form configuration section routes with actual create flow

* Change section to group

* Change section to group in services and controllers

* Change section to group in en.yml

* Fix rubocop errors

* Move the query group persistence assertion from the JS feature spec
to the synchronous form configuration groups controller spec.

* Reuse query service result in embedded query build

* Keep inactive attribute filter after turbo list refresh

* Extract form configuration group edit state into form model

* Fix the failing test

* Potential fix for pull request finding 'CodeQL / Potentially uninitialized local variable'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Rename inactive attribute component inputs

* Refine reset dialog wording for form configuration

* Use direct Turbo action for adding attribute groups

* Reuse generic filter-list controller for inactive attributes

* Remove focus impelementation in ts

* Group form configuration Stimulus controllers under one namespace

* Use turbo request service in form configuration controller

* Clarify legacy group key normalization in form config contract

* Replace inactive attribute list wrapper via turbo stream

* Extract duplicate untitled group key generation into Type::FormGroup.next_untitled_key

* Auto-generate untitled group name on create instead of returning an error

* Avoid mixed return types in form config group create service

* Extract shared form configuration group service behavior into concern

* Fix spacing for the last group and italic font for the placeholder rows

* Replace Angular no-results component with Primer Banner on form configuration page

* Hide dropped element immediately to prevent flickering before Turbo Stream response

* Reload type before rendering create error to prevent duplicate groups

* Await service initialization before use to prevent potential race condition

* Replace sleep calls with deterministic waits in form configuration spec

* Handle malformed JSON and invalid query errors gracefully in form configuration update

* Make query group label a clickable button and empty group hint italic

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-05-13 12:56:18 +02:00
David. 070c9d41f8 Merge branch 'dev' into feature/72383-workflows-ux-improvement-apply-workflow-setting-from-role-to-role 2026-04-21 13:51:06 +02:00
Alexander Brandon Coles ee1fad657f Adjust type form config features
Update the Backlogs-related type form expectations so reset and
empty-state coverage matches the current Position-in-Other behavior.
2026-04-17 10:15:38 +01:00
David F f6bd0d815f Fix tests on CI. wp/72383 2026-03-26 10:48:26 +01:00
David F d49639ab03 Fix last tests after merge and UI changes, bis repetita. wp/72383 2026-03-24 18:55:37 +01:00
Mir Bhatia 4c7d03bcad Add and update specs 2026-03-19 14:38:42 +01:00
David F 09f36d96ab WIP: List types on workflows admin index before editing one of them. #72234 2026-03-12 12:26:47 +01:00
OpenProject Actions CI cbdde02105 Merge branch 'release/17.0' into dev 2026-01-26 14:33:05 +00:00
Dombi Attila 82e427edc8 [#70297] Error 500 on Form configuration page after adding a new CF
https://community.openproject.org/work_packages/70297
2026-01-26 12:30:31 +02:00
Ivan Kuchin 3473972dda remove explicit requires of support/pages/custom_fields/index_page 2026-01-08 17:27:35 +01:00
Alexander Brandon Coles ac6ef78471 Fix Types workflow feature for changed markup 2025-12-10 22:51:58 -03:00
Oliver Günther 14192a74c3 Replace confirm with turbo-confirm, method with turbo-method 2025-09-26 09:15:04 +02:00
Yauheni Suhakou e754ef7e50 [#64621] Move Types controller to the new namespace (#19388)
* Move `TypesController` to `WorkPackageTypes` namespace
* Replace the outdated template with a primer
* Also, eliminated a couple of N+1's for `TypesController`
* Clean up the code
* Remove TypesController#update action
* Cleaned up old `tab` paths
* Delete edit.html.erb
* Remove edit action from `TypesController`
* Remove the rest of the unused files
2025-07-10 10:36:20 +02:00
Yauheni Suhakou 893e0210f8 [#64619] Add form configuration tab for work package types (#19319)
Add a form configuration tab for work package types. 
Introduces a new `FormConfigurationTabController`, view, and routes to allow editing and updating form configuration for work package types.
Updates the attribute groups transformer and update service to handle attribute group parameters correctly.
2025-07-01 16:44:38 +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
as-op a283534b00 Merge branch 'release/15.5' into merge-15.5-into-dev
# Conflicts:
#	config/locales/crowdin/ru.yml
#	modules/boards/config/locales/crowdin/cs.yml
#	modules/reporting/app/workers/cost_query/pdf/timesheet_generator.rb
#	modules/storages/config/locales/crowdin/it.yml
2025-04-24 10:33:22 +02:00
Christophe Bliard 424d873e73 Fix flaky specs
Failing spec is ./spec/features/types/form_configuration_query_spec.rb:174
on job run https://github.com/opf/openproject/actions/runs/14513528848/job/40717420434

The spec seems flaky because the form configuration modal is opened
while the page is reloaded, which closes the modal and then the elements
inside the modal cannot be clicked anymore.

This is fixed by calling `expect_and_dismiss_flash` instead of
`expect_flash` in the specs so that it waits for the save to complete.
If not dismissed, it does not wait the second time, which is the case in
the flaky spec.

I also changed `add_query_group` to yield the modal to the caller so
that the caller can interact with the modal before saving it. It's
better than creating it, closing it, then reopeining it again with
`edit_query_group` to make modifications. I thought it was the culprit
for the flakiness but actually no. But the code read better so I kept
it.
2025-04-22 13:12:33 +02:00
Dombi Attila 7a62dc212f Wait for reload before opening the work package column settings 2025-04-09 16:26:15 +03:00
as-op 6bb9b3886b add frontend spec 2025-02-18 14:58:59 +01:00
Eric Schubert af0a31dc50 [#60144] retain and submit copy workflow value
- fetch correct parameter for copy workflow value on form submission
- initialize form with this parameter if available
- fix feature spec with new UI
2025-01-27 15:58:34 +01:00
Eric Schubert de4eb6cfa5 [#60183] add pattern contract validation to subject configuration
- https://community.openproject.org/work_packages/60183
- rewrite work package type routes
- added new controller for subject configuration
- fixed test expectation values for radio buttons
- removed tests for disabled submit button
- extracted tests to new controller
2025-01-17 13:24:27 +01:00
Oliver Günther b214c61315 Reset some specs 2025-01-14 13:23:57 +01:00
Oliver Günther f791d33b72 Replace specs 2025-01-14 10:20:35 +01:00
ulferts 866b739cff split project setting spec support pages 2024-11-28 11:38:00 +01:00
ulferts 737da12068 fix flickering types active in project spec 2024-11-13 11:47:40 +01:00
Oliver Günther 5412c5b16b Merge pull request #17044 from opf/feature/46309-custom-field-no-longer-added-to-all-projects-when-added-to-a-type
Feature/46309 Custom field no longer added to all projects when added to a type
2024-10-28 12:34:52 +01:00
ulferts 899445c339 adding a cf via form configuration no longer enables the cf in all projects 2024-10-25 15:21:57 +02:00
Eric Schubert a8a6d112da [#58426] add feature spec for custom fields of type hierarchy
- https://community.openproject.org/work_packages/58426
- add a couple of test selectors
- add page objects
2024-10-25 10:49:58 +02:00
Oliver Günther cd2d0f0e1a Remove primerized_flash prefix in methods 2024-09-30 21:39:36 +02:00
Oliver Günther 9cc3d98391 Replace expect_primerized_error -> expect_primerized_flash 2024-09-30 21:39:00 +02:00
Oliver Günther 1cf49e2c9f Adapt specs 2024-09-30 20:37:00 +02:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
ulferts 3660031344 adapt spec setup 2024-06-21 13:34:02 +02:00
Aaron Contreras 67b52fdcc1 Adjust specs to new duration formats 2024-05-13 19:07:31 -05:00
ulferts b3998d3dde rename key/label to estimates_and_progress 2024-04-24 10:33:47 +02:00
ulferts 5f0a5d063e rename group to "Estimates and progress" 2024-04-22 10:58:39 +02:00
ulferts 7c139d0311 move percentage_done to "estimates and time" section 2024-04-19 16:37:28 +02: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
Christophe Bliard d4d7506c01 [50955] Rename time fields in the UI
Estimated time => Work
Remaining time => Remaining work
Progress (%) => % Complete

The export pdf test needed to be fixed too: The test has been updated to expect
only 1 page instead of two. As fields having been renamed, they are now
shorter. So some vertical space is saved and the additional page break
is not triggered anymore before rendering the custom fields.
2023-12-05 16:37:20 +01:00
ulferts 5b2bc41f41 Merge remote-tracking branch 'origin/dev' into easier-factory-role-setup 2023-10-12 12:09:27 +02:00
ulferts 2b2abf864a introduce ProjectRole model 2023-10-09 14:34:20 +02:00
Klaus Zanders 78c1e4fadb Switch all uses of principal factories to use new interface 2023-10-09 10:39:44 +02:00
Christophe Bliard df827db627 Refactor CustomField factories using traits
Reduce duplication and harmonize the factory names:
- bool/boolean => boolean
- int/integer => integer

Co-authored-by: Aaron Contreras <aaronlcaq@gmail.com>
2023-08-29 08:57:39 +02:00