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 ticket list : type_code multiselect search can be an empty value.… #31709

Open
wants to merge 2 commits into
base: 17.0
Choose a base branch
from

Conversation

thomas-Ngr
Copy link
Contributor

Fix multiselect on ticket list would allow empty value for type_code

On ticket list, the search for type_code is a multiselect. It can receive an empty value that would mean 'type_code is not set'.
Since type_code is a mandatory value, a search on value 'is not set' should not be allowed.

Capture d’écran_2024-11-06_11-49-56

@eldy
Copy link
Member

eldy commented Nov 6, 2024

The empty value into the select list means "We don't want any filter". And we should be able to not set any filter on this field so the empty choice should remain into the combo, but no filter should be done in this case.

@eldy eldy added the Discussion Some questions or discussions are opened and wait answers of author or other people to be processed label Nov 6, 2024
@thomas-Ngr thomas-Ngr force-pushed the 17.0_fix_ticket_list_empty_multiselect branch 2 times, most recently from 84c4394 to f84e325 Compare November 7, 2024 09:54
@thomas-Ngr thomas-Ngr force-pushed the 17.0_fix_ticket_list_empty_multiselect branch from f84e325 to cf91674 Compare November 7, 2024 09:57
@thomas-Ngr
Copy link
Contributor Author

You are right. Problem is, if we chose this empty value we get a nice error page (here an abstract). Tested on a fresh V17 install without any module.

image

with this nice request

SELECT t.rowid,t.entity,t.ref,t.track_id,t.fk_user_create,t.origin_email,t.subject,t.type_code,t.category_code,t.severity_code,t.fk_soc,t.notify_tiers_at_create,t.fk_project,t.datec,t.date_read,t.date_last_msg_sent,t.fk_user_assign,t.date_close,t.tms,t.message,t.email_msgid,t.progress,t.email_date,t.resolution,t.fk_statut,t.import_key FROM llx_ticket as t LEFT JOIN llx_societe as s ON (t.fk_soc = s.rowid) WHERE t.entity IN (1) AND (type_code IN ()) ORDER BY t.datec DESC LIMIT 21

containing this nice WITH clause :

AND (type_code IN ())


The solution is to remove empty values from the search array. User may still be confused by being able to chose empty value, but at least the search will work.

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.

2 participants