Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to define multiple dropdown fields #600

Merged
merged 12 commits into from
Nov 28, 2022

Conversation

Aeto-J
Copy link
Contributor

@Aeto-J Aeto-J commented Nov 25, 2022

Hello,

-Add multiple dropdown feature ( creation and default value)

Thank you,
Regards Aeto-J

@cedric-anne cedric-anne self-requested a review November 25, 2022 12:24
@cedric-anne cedric-anne changed the title Field multiple dropdown Add ability to define multiple dropdown fields Nov 28, 2022
@cedric-anne
Copy link
Contributor

Hi,

  1. I simplified the field form to use only one ajax endpoint.
  2. I fixed log entry handling (was failing with a MySQL warning SQL: SELECT `glpi_computers`.*, '' AS `transname`, '' AS `transcomment` FROM `glpi_computers` WHERE `glpi_computers`.`id` = '["10","9","25"]'.
  3. I fixed display of search option in search results.
  4. I extended this behaviour to 'dropdown' fields.
  5. I renamed field from 'multiple_dropdown' to 'multiple', as this field may also be used if we want to allow multiple text values in the future.

If it is OK for you, I will merge it.

@tomolimo
Copy link
Collaborator

Hello @cedric-anne
This is OK for me,
Thank you
Regards,
Tomolimo

@cedric-anne cedric-anne merged commit 1909d48 into pluginsGLPI:develop Nov 28, 2022
@cedric-anne cedric-anne added this to the 1.19.0 milestone Nov 28, 2022
@Aeto-J
Copy link
Contributor Author

Aeto-J commented Dec 6, 2022

Hello,
there is a warning at the default value of a new dropdown field
image

I think the error must come from line 96 of the 'field_specific_field.php' file because the '$dropdown_matches' variable is initialized on line 81 and reset to null before a test to display the default value this erases the 'class' key from the table and we need it to create the default value field
image
I don't know if line 96 is useful for this feature to work

Thank you,
Regards,
Aeto-J

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

Successfully merging this pull request may close these issues.

3 participants