Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Searching for numbers?

I just installed Version 1.6 RC5 and when I search for numbers (i.e. 1234) it doesn't give me any results. I've tried a couple different installations on our server and each one behaves the same way.

I searched the forums and couldn't find anyone else with this problem. Can anyone point me in the right direction for fixing this?

Thanks.

Comments

  • Where exactly are you searching for this?

    What message comes up after you try?

    Do you get any DB Error # in your Dashboard?
  • I'm searching from the staff panel, no errors of any sort pop up. The only response I get is "Query returned 0 results"

    Searching for words works fine, but searching for a number returns nothing at all (unless I search for the ticket number or any part of a ticket number also which seems to work fine)
  • So you are wanting it to search for numbers that are within the subject field then?
  • Searching for a number in any part of the message doesn't work. I saw reference to a mod someone had done to search in the subject, but mainly I need to search the body of the ticket which for me isn't working.
  • joogs,

    include/staff/tickets.inc.php

    Remove this:
            if(is_numeric($searchTerm)){
    $qwhere.=\" AND ticket.ticketID LIKE '$queryterm%'\";


    And insert this in its place:
    if(is_numeric($searchTerm)){
    $deep_search=true;
    $qwhere.=\" AND ( ticket.ticketID LIKE '%$queryterm%'\".
    \" OR ticket.subject LIKE '%$queryterm%'\".
    \" OR message.message LIKE '%$queryterm%'\".
    ' ) ';
  • excellent. That did it. Thank you much.
  • Hi, is there a way to have results even though your not entering the whole number? For example if I search 9742, one of the results is a ticket that has 74959742 on an internal note. Is this possible? Right now if I don't enter the number exactly, it doesn't find it.

    thanks
  • Did anybody figure this out?

    "Hi, is there a way to have results even though your not entering the whole number? For example if I search 9742, one of the results is a ticket that has 74959742 on an internal note. Is this possible? Right now if I don't enter the number exactly, it doesn't find it."
  • worked for me

    Thanks Scottro,

    your code cut&paste instructions worked for me. Thank-you!.... saved the day.

    D
  • Saved my day also

    thanks scottro, did work for me also, we have the same advantage, we use subject as account number of our customers.
    This works perfekt! Maybe it should go into the next version?

    :cool:
  • not working in OST 1.7

    I have this exact same issue, but I am using OST 1.7. I tried the fix suggested here but the database still does not return search results for numbers in the message body. If I surround my search by %'s it works. Any help please.
  • Search function problem

    This is a problem that plagues me also, however thanks to the poster above for the temporary solution of using the % character to enclose the search term I can now at least move forward with our roll-out (the system is useless to us without a proper search function).

    Hope this issue get resolved asap.:)
Sign In or Register to comment.