* 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>
* 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>
Add fetch_request_cached method that layers RequestStore in front of Rails.cache.fetch
Used in the following places, as they are repeatedly accessed during schema initialization.
all_work_package_form_attributes, form_config_attribute_representation, Query.available_columns
In my tests, this improves cold cache access by reducing initial number of queries to access cache
This error is intended for cases when a method is
intentionally not implemented, because the module/class defining
it expects a subclass (or class including the module) to implement
the method.
This is intended to distinguish it from other cases, such as:
* feature not implemented yet
* edge case of a method call not yet supported
Notably it avoids the misuse of the Ruby-defined NotImplementedError,
which is only intended for much more specific scenarios:
> Raised when a feature is not implemented on the current platform. For example, methods depending on the fsync or fork system calls may raise this exception [...]
Also see https://docs.ruby-lang.org/en/master/NotImplementedError.html
Include the number of `EXCLUDED` attributes in the cache key for the
work package form attributes. This ensures that the cache is invalidated
when the number of excluded attributes changes.
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
Priority was marked non-required for it to turn up in the
attribute form configuration.
But priority _is actually required_. This results in the frontend adding
an optional placeholder `-` value, which makes the resource unsavable.
This commit adds priority to the form, but keeps it required as it
should be.
https://community.openproject.com/wp/33678
The form configuration used to be submitted at least twice. In most cases, the first submit was canceled fast enough to not reach the backend. But if it was not canceled fast enough, the duplicate post lead to some errors when e.g. the referenced queries where already deleted.