[#21889] testtest#23470
Closed
thykel wants to merge 1 commit into
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Work package: https://qa.openproject-edge.com//work_packages/21889 — plan & discussion in the comments.
What are you trying to accomplish?
The work package identifier admin settings page displayed the radio button options in the wrong order: Numeric (classic) appeared first, Semantic second. The options should be shown with Semantic first and Numeric (classic) second.
The root cause was the order of constants in
ALLOWED_VALUESinsideSetting::WorkPackageIdentifier. The view component iterates this array directly to render the radio buttons, so the display order matched the array order.Screenshots
N/A
What approach did you choose and why?
Swapped the two entries in
ALLOWED_VALUES:This is the only change required. The view component (
identifier_settings_form_component.rb) mapsALLOWED_VALUESdirectly to radio button options, so correcting the array order fixes the display order without touching any template, translation, controller, or migration. The default value ("classic") is defined independently inconfig/constants/settings/definition.rband is unaffected.A dedicated spec assertion (
"lists semantic before classic") was added tospec/models/setting/work_package_identifier_spec.rbto pin this order and prevent future regressions.Merge checklist