Actions
Bug #163
closedTreatment of project custom fields
Start date:
02/18/2021
Due date:
% Done:
100%
Estimated time:
(Total: 0.00 h)
Affected Version:
Compatible Redmine Version:
Pull Request Link:
Description
Implementation¶
In admin area¶
Project types¶
If a project custom field should be disabled, a check will run in oder to find out if there are projects using the respective custom field (ProjectType#integrity_of_project_custom_fields). If so, a validation error is thrown to the user.
Project custom fields¶
In case an administrator tries to disable a certain project type for a project custom field, the same validation as above will run by delegation.
In project settings¶
When a authorized user tries to change the project type of a project an AciveRecord::Callback.before_validations will run.
This callback runs Project#revise_project_type_dependencies. The method again has two implementations:
- prevent_custom_fields_from_deletion
- delete_custom_fields_after_project_type_reassignment
Actions