Refactor ComplianceFramework::FRAMEWORKS to ActiveRecord Model
This is one of the issues required to implement #231247 (closed) entirely.
Problem to solve
Currently, a project can have a compliance framework set in the form of
ComplianceManagement::ComplianceFramework::ProjectSetting being associated to a
framework attribute on this object is a hard-coded set of common compliance frameworks defined in
To achieve the outcome in this issue, we need to refactor the backend to allow the ability for custom frameworks to be added. This needs to be backwards-compatible and not affect existing projects which may already have one of these pre-defined compliance frameworks associated with it.
- Create a new ActiveRecord model to represent the custom "compliance framework labels" that will be created at the "root group" level.
- For each root group, create one "compliance framework label" record for each unique label name used by that group's projects (so there would be no more than 5 records created for each root group, because there were only 5 default labels).
- Replace the
project_compliance_framework_settings.frameworkenum values with a foreign key relation to the newly-created "compliance framework label" record.
Note: This lays the foundation for the ability to create/update/delete labels, which will be implemented under #231247 (closed).