Skip to content

[#21889] testtest#23470

Closed
thykel wants to merge 1 commit into
devfrom
fix/21889-testtest
Closed

[#21889] testtest#23470
thykel wants to merge 1 commit into
devfrom
fix/21889-testtest

Conversation

@thykel
Copy link
Copy Markdown
Contributor

@thykel thykel commented May 30, 2026

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_VALUES inside Setting::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:

# Before
ALLOWED_VALUES = [CLASSIC, SEMANTIC].freeze

# After
ALLOWED_VALUES = [SEMANTIC, CLASSIC].freeze

This is the only change required. The view component (identifier_settings_form_component.rb) maps ALLOWED_VALUES directly 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 in config/constants/settings/definition.rb and is unaffected.

A dedicated spec assertion ("lists semantic before classic") was added to spec/models/setting/work_package_identifier_spec.rb to pin this order and prevent future regressions.

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

@thykel thykel closed this May 30, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators May 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant