Skip to content

fix(container.class.php): fix the name of dropdown fields in log#1212

Merged
stonebuzz merged 1 commit into
pluginsGLPI:mainfrom
TarekRemo:ticket_44835
Jun 24, 2026
Merged

fix(container.class.php): fix the name of dropdown fields in log#1212
stonebuzz merged 1 commit into
pluginsGLPI:mainfrom
TarekRemo:ticket_44835

Conversation

@TarekRemo

Copy link
Copy Markdown
Contributor

Checklist before requesting a review

Please delete options that are not relevant.

  • 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.

Description

  • It fixes !44835
  • Before this fix, the name of dropdown fields was missing in logs.
  • For dropdown fields (both custom and dropdown-<ItemType>), the search option sets:
    • fieldcompletename or name (from the foreign table, e.g. glpi_users.name)
    • linkfield → the actual column in the container table (e.g. usersfield_0)
  • So, the current code compares name against the actual DB column key when updating = it never matches -> the name of the field doesn't appear.
  • fix: add $searchoption['linkfield'] == $key to check the the actual column in the container table.

@TarekRemo TarekRemo self-assigned this Jun 22, 2026
@TarekRemo TarekRemo added the bug label Jun 22, 2026
@TarekRemo TarekRemo requested a review from stonebuzz June 22, 2026 11:27
@stonebuzz

Copy link
Copy Markdown
Contributor

Awaiting customers feedback

@stonebuzz stonebuzz merged commit dde7761 into pluginsGLPI:main Jun 24, 2026
3 checks passed
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