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

FIX select on ticket list for fields group and severity (issue #31619) #32142

Closed

Conversation

thomas-Ngr
Copy link
Contributor

@thomas-Ngr thomas-Ngr commented Nov 29, 2024

FIX select group and severity search fields on ticket list

issue #31619 (indicates 20.0, but I encountered it also on develop)
see also PR #32120 , which is similar but for ticket type, and brings more details.

group and severity must be set when creating/updating a ticket, and have a default value.
However, on search fields, we don't want to set the default value.

This PR sets the default value only if $empty is not set.
These are the changes brought by this PR :

  • when $empty is set (case search lists), the empty value is selected
  • when $empty value is not set, the default value is selected. If there is no default value, the firs value of the list is selected.

@thomas-Ngr thomas-Ngr force-pushed the 18.0_fix_search_ticket_list branch from 1dd1488 to 0c7bf90 Compare December 3, 2024 13:16
@eldy
Copy link
Member

eldy commented Dec 5, 2024

I disagree with the change for the following reason:
This pr fix the trouble by introducing a way of working that differs on how other combo list had adressed the same trouble.
The way a lot of other combolist works was to use the string "Select a new elem" into the param $empty of the function of the component (so propagated from the caller) instead of being hard coded into the component itself.
Also when we want an auto select of a value in combo when combo has only 1 element, we can use the value 'ifone' for the param $empty.
So, i suggest insteaf to try a fix by a backport of this commit b56ac12

@eldy eldy added the Discussion Some questions or discussions are opened and wait answers of author or other people to be processed label Dec 5, 2024
@thomas-Ngr thomas-Ngr force-pushed the 18.0_fix_search_ticket_list branch from 16449d4 to e8aaa51 Compare December 6, 2024 13:08
@thomas-Ngr
Copy link
Contributor Author

@eldy @lvessiller-opendsi @rycks I force-pushed a new version :

  • backport b56ac12
  • set   as default empty value on the list.php for both functions selectGroupTickets and selectSeveritiesTickets

NB - the bug exists also on develop despite commit b56ac12, so this fix may be ported upwards up to develop branch. here the ticket list on develop, showing default values instead of empty boxes :

image

@thomas-Ngr
Copy link
Contributor Author

I had to restart the PR on ##32411 because the branch name created an issue in precommit. (it contained "18.0")

@thomas-Ngr thomas-Ngr closed this Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Some questions or discussions are opened and wait answers of author or other people to be processed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants