Adds the computed semanticId property to the HAL representer,
SQL collection representer, and schema representer. The property is
gated behind the semantic_work_package_ids feature flag and returns the
value from WorkPackage#identifier. Includes OpenAPI docs
and the translation key for the schema name.
The setting previously used "numeric" and "alphanumeric" as its allowed
values. Rename them to "classic" and "semantic" to better align with the
product terminology for the work package identifier modes.
Includes a migration to update any stored setting values in the database,
updated constants and helper methods on Setting::WorkPackageIdentifier,
and all corresponding references across models, components, forms,
frontend controllers, locales, and specs.
Three issues corrected:
1. Bug fix: ALLOWED_VALUES is an Array; ALLOWED_VALUES[:alphanumeric] raises
TypeError at runtime (symbols are not valid Array indices). Extract named
string constants NUMERIC and ALPHANUMERIC so comparisons are explicit.
2. Lazy-load guard: ProjectHandleSuggestionGenerator ran a DB query on every
component render, even in numeric mode where the result is never used.
Now the query only runs when alphanumeric? is true; numeric mode gets [].
3. show_autofix_section? simplified: the alphanumeric? guard moved into the
initializer, so the private method is now just projects_data.any?.
Also: wrap definition.rb's `allowed:` in a lambda to defer constant
resolution past Rails autoload (fixes a load-order error in specs), and
add a spec for Setting::WorkPackageIdentifier covering the bug scenario.