Skip to content

[Fix] Mapping issues between a dropdown with multiple answers and it's form destination - #1277

Merged
stonebuzz merged 5 commits into
mainfrom
fix/46462/form-destination-multiple-dropdown
Oct 1, 2026
Merged

stonebuzz merged 5 commits into
mainfrom
fix/46462/form-destination-multiple-dropdown

Conversation

@jdurand-teclib

@jdurand-teclib jdurand-teclib commented Sep 29, 2026 •

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

  • It fixes !46462
  • Here is a brief description of what this PR does
    • Add distinct treatment for multiple dropdown field type. It was treated like a classical dropdown and it's answer was casted as an int instead of an array
    • When formating raw answers, read $answer['items_id'] in case of a multiple dropdown containing several glpi items to avoid display issued in the items names.

Important

Change of behavior: As a form already has default values, deleting pre-written default answer to a question when filling the form was actually replacing it by field's default value, whereas it would be more logical to imagine that the user actually wanted to leave the form blank.
Logic is consistent the other way around with a default value in the field but not in the form, as the user has no idea of the field configuration, he would find himself with values on a field he left blank.
The previous behavior was not documented on gitbook.

@Rom1-B
Rom1-B self-requested a review September 30, 2026 12:41
Comment thread inc/destinationfield.class.php
Comment thread CHANGELOG.md Outdated
jdurand-teclib and others added 2 commits October 1, 2026 08:55
Co-authored-by: Romain B. <8530352+Rom1-B@users.noreply.github.com>
…t $value value

Co-authored-by: Romain B. <8530352+Rom1-B@users.noreply.github.com>
@jdurand-teclib
jdurand-teclib requested a review from Rom1-B October 1, 2026 06:57
@jdurand-teclib

Copy link
Copy Markdown
Contributor Author

Customer stated the fix is effective

@stonebuzz
stonebuzz merged commit f468b95 into main Oct 1, 2026
7 checks passed
@stonebuzz
stonebuzz deleted the fix/46462/form-destination-multiple-dropdown branch October 1, 2026 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants