Skip to content

Conversation

@stonebuzz
Copy link
Contributor

@stonebuzz stonebuzz commented Jun 14, 2022

When self-service select an itil categorie from tick

form is reload and fields don't take care of new value

Only work for itilcategories_id because thatt trigger a reload of form

Fix : (portal) !6633

@stonebuzz stonebuzz added the bug label Jun 14, 2022
@stonebuzz stonebuzz requested a review from cedric-anne June 14, 2022 13:58
@stonebuzz stonebuzz self-assigned this Jun 14, 2022
@cedric-anne
Copy link
Contributor

Only work for itilcategories_id because thatt trigger a reload of form

I think this is a similar issue as #524 . We should adapt display state of containers depending on current values in form. For instance, if a rule indicates that a container should be displayed when Group in charge == "Example group", corresponding fields should be displayed in current form when this group is selected, but currently form has to be submitted and values saved to be able to apply display rules.

So, for me, the technical solution is to send an AJAX query containing all form values everytime a field is changed in the form, in order to recompute visibility of fields based on target values (i.e. array_merge($item->fields, $form_values)).

@cedric-anne cedric-anne added this to the 1.15.4 milestone Jun 21, 2022
@cedric-anne cedric-anne merged commit 3dc1434 into pluginsGLPI:develop Jun 23, 2022
@cedric-anne cedric-anne modified the milestones: 1.15.4, 1.16.0 Jun 23, 2022
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.

4 participants