Skip to content

FIX / Mandatory dropdown value hidden by a leftover column with the sam… - #1362

Merged
Rom1-B merged 1 commit into
11.0/bugfixesfrom
fix/dropdown-value-shadowed-by-orphan-column
Nov 24, 2026
Merged

Rom1-B merged 1 commit into
11.0/bugfixesfrom
fix/dropdown-value-shadowed-by-orphan-column

Conversation

@Mary-Clb

Copy link
Copy Markdown
Contributor
  • I have performed a self-review of my code.
  • I have added tests (when available) that prove my fix is effective or that my feature works.
  • I have updated the CHANGELOG with a short functional description of the fix or new feature.
  • This change requires a documentation update.

Description

When a block table contains a leftover column named after a dropdown field (for example after the field was recreated with another type), approving the solution of a change fails with "Some mandatory fields are empty" although the dropdown value is filled. The lookup order in validateValues, which checks the field name before the dropdown key, is older but was harmless while only submitted values were validated. Since #1269, updates without submitted values are checked against the whole stored row, so the leftover column (0) now hides the real value stored in plugin_fields_<name>dropdowns_id.

The value key is now chosen from the field type, as already done elsewhere in the plugin: the dropdown key for dropdown fields, the field name otherwise. A test reproducing the leftover column on a change update is added.

Screenshots (if appropriate):

@Mary-Clb Mary-Clb self-assigned this Nov 19, 2026
@Mary-Clb Mary-Clb added the bug label Nov 19, 2026
@Mary-Clb
Mary-Clb marked this pull request as ready for review November 19, 2026 09:22
@Mary-Clb
Mary-Clb requested review from a team, MyvTsv, Rom1-B and RomainLvr and removed request for a team November 19, 2026 12:55
Rom1-B
Rom1-B previously approved these changes Nov 19, 2026

@Rom1-B Rom1-B left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rebase

@Mary-Clb
Mary-Clb force-pushed the fix/dropdown-value-shadowed-by-orphan-column branch from d55956d to c055ceb Compare November 23, 2026 13:30
@Rom1-B
Rom1-B merged commit db0d7f0 into 11.0/bugfixes Nov 24, 2026
7 checks passed
@Rom1-B
Rom1-B deleted the fix/dropdown-value-shadowed-by-orphan-column branch November 24, 2026 09:53
@glpi-project

glpi-project Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Backport-action backported this pull request in workflow run 45369540225.

Target Status
main ✅ Created #1368

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants