Updates the form visuals based on new mockups: the Project copy form now
only includes required (built-in and custom) fields, along with the
"Subproject of" field.
In detail:
* Introduces `Projects::CopyFormComponent`.
* Adds `Projects::CopyForm` with basic specs.
* Adds `ProjectsController#copy_form` action, permissions and route
mappings.
* Updates copy project feature specs to reflect form changes.
Updates the form visuals according to new wireframes: the Project create
form now only includes required (built-in and custom) fields, along with
the "Subproject of" field.
In detail:
* Introduces `Projects::NewComponent` and `TemplateSelectComponent`.
* Adds, extends necessary Primer forms with basic specs.
* Adds `ProjectsController#create` action, routes and permissions.
* Adds `highlight-when-value-selected` Stimulus controller.
* Updates project feature specs for new form, including rewriting some
expectations that were reliant on `data-qa-name` attribute that Primer
form components do not render by default.
* Removes now obsolete Project Status administation feature spec.
* Use acts_as_url to generate unique slug for identifier
* Re-enable project identifier spec now handled in backend
* Add integration spec for set attribute service
* Adapt spec for new empty identifier
* Avoid double error messages for empty identifier
acts_as_url may return an empty string depending on the name,
but the empty presence validation will suffice in this case, we don't need the invalid validation
* Fix stubbed errors object accessed by acts_as_url
* Avoid trying to get the upstream unique attribute in case of errors
* Remove sequential_project_identifiers setting
* Adapt spec to review feedback
* Projects form working with formly 50%
* Removed console.log
* Working with formattable
* Working with formattable
* Input with id and label
* Input with id and label
* Useless dependencies removed
* Saving forms + required labels with *
* First backend validation approach
* Removed reload on type change + keep model on route changes
* Handlig backend validations with setError
* Formatting the form model to submit
* Make up refactor
* working with op-form-field
* Form creation moved to the service
* Working with op-form-field wrapper
* Working with validation and op-form-field
* Working with []CustomFields
* Clean up
* Clean up
* Clean up
* Clean up
* Form routing working
* Notification on form error and success
* Refactor + removed useless dynamic form observable
* DynamicFieldsService with tests
* Refactor: inputs catalog + catch form load error
* Filter out non writable fields
* Refactor: naming consistency
* Cleaning comments
* dynamic-fields-service tests + wrapper component
* DynamicForm Tests
* @ngx-formly/core dependency added
* Cleaning up
* Provide DynamicFieldsService in root so it can be used independently
* DynamicForm working as a FormControl
* Getting route params sync
* Global FormsService: submit + formatting + error handling
* Fix: @Optional() FormGroupDirective in OpFormFieldComponent
* Code climate fix
* Removed CdkTextareaAutosize because of CDK issue 22469
* DynamicFormComponent tests
* Dynamic input test helpers + boolean and text tests
* Refactor edit fields to avoid circular dependencies in the dynamic forms
* Naming fix
* IntegerInputComponent tests
* SelectInputComponent tests
* Fix: duplicated identifier on inputs
* Extract toolbar to be reused for now
Still TBD whether we want to move them right now to the frontend?
* Create new project route and redirect to rails view after saving
* fieldsSettingsPipe + hide 'identifier' on projects
* Handling multi-values (also as links) and passwords
* Some TODOs removed
* FormattableTextareaInputComponent tests
* Projects form working with formly 50%
* Removed console.log
* Working with formattable
* Working with formattable
* Input with id and label
* Input with id and label
* Useless dependencies removed
* Saving forms + required labels with *
* First backend validation approach
* Removed reload on type change + keep model on route changes
* Handlig backend validations with setError
* Formatting the form model to submit
* Make up refactor
* working with op-form-field
* Form creation moved to the service
* Working with op-form-field wrapper
* Working with validation and op-form-field
* Working with []CustomFields
* Clean up
* Clean up
* Clean up
* Clean up
* Form routing working
* Notification on form error and success
* Refactor + removed useless dynamic form observable
* DynamicFieldsService with tests
* Refactor: inputs catalog + catch form load error
* Filter out non writable fields
* Refactor: naming consistency
* Cleaning comments
* dynamic-fields-service tests + wrapper component
* DynamicForm Tests
* @ngx-formly/core dependency added
* Cleaning up
* DynamicForm working as a FormControl
* Getting route params sync
* Global FormsService: submit + formatting + error handling
* Fix: @Optional() FormGroupDirective in OpFormFieldComponent
* Code climate fix
* Removed CdkTextareaAutosize because of CDK issue 22469
* DynamicFormComponent tests
* Dynamic input test helpers + boolean and text tests
* Refactor edit fields to avoid circular dependencies in the dynamic forms
* Naming fix
* IntegerInputComponent tests
* SelectInputComponent tests
* Fix: duplicated identifier on inputs
* Extract toolbar to be reused for now
Still TBD whether we want to move them right now to the frontend?
* Create new project route and redirect to rails view after saving
* fieldsSettingsPipe + hide 'identifier' on projects
* Handling multi-values (also as links) and passwords
* Some TODOs removed
* FormattableTextareaInputComponent tests
* _isResourceSchema based on parent?.location
* Scope DynamicFieldsService to DynamicFormComponent
* Added backend validation method to FormsService
* Removed projects routes and ruby template
* Removed projects routes and dynamic forms from Projects
* Revert "Provide DynamicFieldsService in root so it can be used independently"
This reverts commit ab56f3c56f.
* Provide DynamicFieldsService in root so it can be used independently
* TODO: test ProjectsComponent
* Code climate fixes (remove TODOs)
* Default OpFormFieldComponent.inlineLabel to false
* Dynamic components tests xkipped
* Typing improvements
* DynamicFormComponent working as a FormControl
* Global FormsService: submit + formatting + error handling
* Fix: @Optional() FormGroupDirective in OpFormFieldComponent
* Code climate fixes
* noWrapLabel default to false
* Started adding user custom fields to the ium
* Import the dynamic-forms module into the common module
* Refactor edit fields to avoid circular dependencies in the dynamic forms
* Using DynamicFormsModule in OpenprojectInviteUserModalModule
* Add formly form
* Update principal name filter
* Dynamic form field is rendering
* Handling multi-values (also as links) and passwords
* Added backend validation method to FormsService
* Remove form from DynamicForm when not isStandaloneForm
* Allow multiple form keys to validate
* Remove form from non standalone forms
* Remove duplicated button
* Moved to FormGroup input for dynamic form
* Custom field happy path is done
* Add explanatory comment to payload structure transformation
* add op-form class to ium steps
* Add shrinkwrap back in
* Fix test, fix dynamic form resource path
* gimme a shirnkwrap
* Remove failing tests
* Remove another failing test
* Remove more failing specs
* Fix double loading of principals
* Add custom field spec
* Fix spec
* Reset shrinkwrap
* Forbid Factory.build(:user, member_in_project)
If you use the trait member_in_project(s), the user is implicitly saved
to create the member.
This is very confusing if trying to use required custom fields, as this
will fail with the Member#user_id foreign key being nil, as the user
cannot be saved.
Instead, raise an error when trying to use this factory trait
* Change additional spec factory
Co-authored-by: Aleix Suau <info@macrofonoestudio.es>
Co-authored-by: Oliver Günther <mail@oliverguenther.de>