I have osTicket Version v1.10-73-g973110f (973110f)I have a custom form on all tickets. I have both a text input and a list as form fields in this custom form.When I search tickets based on a specific item of the list (search window has the field name with "includes" and the list item), the result is nothing. I know that I have tickets with this specific list item.Note that I can successfully search tickets on the text input of the form.Is this a known bug?Alternatively, I was browsing the mysql database to find the ticket numbers. I'm seeing the list_item_id but I don't find in the ticket tables where the used list_item_id is stored. I started to read the php code but it's too inbricated.How can I get the tickets ids with a specific list_item selected?

Of course it's ost_list_items but that gives me only the list of items. How do I find the ticket that has this list item?SELECT * from ost_ticket JOIN .... WHERE ost_list_items.item_id=2Anyway, I think there is a bug that it's not working in the interface. Can you confirm that?

@[deleted] How can I get the tickets ids with a specific list_item selected?You'll never be able to find the Ticket ID by the List Item ID lol Each ticket has a Form Entry (related by `object_id` and `type` -> `object_id` being the ticket `id` and `type` being `T` for Ticket). Each Form Entry has Form Entry Values. There you will find the form values for the ticket. You can then get the List's Form Field `id` (by ost_form_field table) and find the value entered for that field for the ticket by matching the List's Form Field `id` with the Form Entry Values `field_id`.Anyway, I think there is a bug that it's not working in the interface. Can you confirm that?I cannot confirm this with v1.10 nor v1.10.1...do you have the "Multiselect" option Enabled and have multiple selections for the list in tickets?Cheers.

Yes, I have tried with multiselect and it's the same problem. I can't search on list item. I can only search text input of the form.My osticket support is available on the public internet. if you send me an email or a private message, I can give you a login so that you can see it by yourself. I haven't modified the installation.

Here is the mysql syntax that works:SELECT object_id FROM ost_form_entry LEFT JOIN ost_form_entry_values ON ost_form_entry.id = ost_form_entry_values.entry_id WHERE ost_form_entry_values.value = '{"1":"Returning - Label sent"}';But I still would love to do it in the UI!!!

@[deleted] After some testing I figured out that if the List field is on the Ticket Details form it will search but if it's on a custom form then it will not search. It's due to how the value is stored in the ticket__cdata table vs the form_entry_values table. Will look into this and update you here when I have further progress. Cheers

Good! Thanks for updating this thread. I'm happy (and sad) to see that I was not dreaming!!! So, it seems like a real bug.At least, with the above mysql syntax, I was able to find the relevant tickets but I need to do this more frequently so this is why I hope it will be fixed in the future.

@[deleted] I have found the issue and working on a fix now (searching was all kinds of effed up for lists and choices fields). Once it's complete I'll push it to Github and post back here. Thanks again for the report. Cheers.

@[deleted] Here you go mate: https://github.com/osTicket/osTicket/pull/4124Cheers.

Great!!! Seems to work! Thank you!

Write a Reply...