Add work_item_system_defined_type feature flag

What does this MR do and why?

This MR is to split the work from a larger MR into smaller ones.

This code change introduces a feature flag system to switch between two different ways of handling work item types

The main change adds a new feature flag called work_item_system_defined_type that allows the system to use either the old database-based approach or a new framework-based approach for managing work item types and widget definitions. Throughout the codebase, direct references to the old WorkItems::WidgetDefinition class are replaced with a dynamic method that checks the feature flag and returns either the old or new widget definition class accordingly.

The changes also include some bug fixes and improvements to the new system-defined widget framework, such as better error handling when widget classes don't exist, and adding missing methods to make the new framework compatible with existing code expectations.

Additionally, there are updates to test files to work with the new system, and some refactoring to improve how namespaces are extracted from different types of objects. The feature flag is initially set to disabled (false) by default, allowing for a gradual rollout of the new system.

This is essentially a behind-the-scenes infrastructure change that prepares the system to migrate from one widget management approach to another, while maintaining backward compatibility during the transition period.

References

gitlab-org#20287

Screenshots or screen recordings

Before After

How to set up and validate locally

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Stefanos Xanthopoulos

Merge request reports

Loading