Results 1 to 6 of 6

Thread: Searching through Opportunities Bug

  1. #1
    faradaygroup is offline Junior Member
    Join Date
    Sep 2007
    Posts
    4

    Default Searching through Opportunities Bug

    Strange problem I have found with Sugar when I try to search through my Opportunities.

    All of our Opportunities in the company are giver a P number, sucha as P2900. So one job might be called 'P???? Sydney Airport Car Rental Facility', etc, etc.

    When I try to search for 'Sydney Airport' in the actual Opportunities Search bar, nothing comes up. But when I search for the P number it comes up no problem.

    It seems that the search bar looks for the first word and not the entire field. Pretty strange search feature.

    I am running the latest 4.5 version of Sugar Community Ed. on a Centos 5 Linux Server. I do not know how my MySQL or PHP version would make a difference with this problem. Knows well list them anyway. MySQL version 5.0.22, PHP version 5.1.6, HTTPD version 2.2.3-7.
    Last edited by faradaygroup; 2007-09-24 at 11:22 PM.

  2. #2
    sacramentojoe is offline Sugar Community Member
    Join Date
    Nov 2005
    Posts
    447

    Default Re: Searching through Opportunities Bug

    Quote Originally Posted by faradaygroup
    Strange problem I have found with Sugar when I try to search through my Opportunities.

    All of our Opportunities in the company are giver a P number, sucha as P2900. So one job might be called 'P???? Sydney Airport Car Rental Facility', etc, etc.

    When I try to search for 'Sydney Airport' in the actual Opportunities Search bar, nothing comes up. But when I search for the P number it comes up no problem.

    It seems that the search bar looks for the first word and not the entire field. Pretty strange search feature.

    I am running the latest 4.5 version of Sugar Community Ed. on a Centos 5 Linux Server. I do not know how my MySQL or PHP version would make a difference with this problem. Knows well list them anyway. MySQL version 5.0.22, PHP version 5.1.6, HTTPD version 2.2.3-7.
    This is not that strange of behavior to me.
    The search requires that you know the first portion of the string and then adds a wild card to the end.
    You can change it in the Opportunity.php file.
    There is a function called build_generic_where_clause() which will allow you to put a wildcard at the front of the string.

  3. #3
    faradaygroup is offline Junior Member
    Join Date
    Sep 2007
    Posts
    4

    Default Re: Searching through Opportunities Bug

    That is strange. Ialways thought the purpose of a search in most cases was to search for any word in a particular field. I have never heard of a situation where you had to know the first wor or nothing came up.

    As long as it can be fixed, thats great. Only problem is that I am a real n00b at php still.

    If someone could tell me which line to change and possibly the code to put in I would be extremely gratefull. This problem is a bit of a show stopper for the company I work for as they always have numerical labels at the front of the name.

  4. #4
    crmtamer is offline Sugar Community Member
    Join Date
    Jul 2007
    Posts
    15

    Default Re: Searching through Opportunities Bug

    Try using the % wildcard in your search. In your example, you would enter: %sydney -- this will find any records with those characters anywhere in the field. Because this is a database field search, and not a text search, by default it will search beginning with the first letter, unless you use the wildcard. I believe you can use the % wildcard by default in Sugar without any code changes.
    Last edited by crmtamer; 2007-09-25 at 12:16 PM.

  5. #5
    faradaygroup is offline Junior Member
    Join Date
    Sep 2007
    Posts
    4

    Default Re: Searching through Opportunities Bug

    Thanks for the help.

    It sort of worked. If I use the generic search field at the top right it finds it no problem. If I use the Opportunity Search, nothing comes up.

    Very strange that is.

    I would prefer to edit the code so that I can Search anywhere without the need for a wildcard at the front so if anyone can help or point me to some documents that are eay for a nub to understand, I would appreciate your help.

    Its very funny. I have been tossing up between a ...... support agreement or Sugar Pro. Both are good but one has some parts better than the other and vice versa. Its never easy.....
    Last edited by faradaygroup; 2007-09-25 at 10:48 PM.

  6. #6
    faradaygroup is offline Junior Member
    Join Date
    Sep 2007
    Posts
    4

    Default Re: Searching through Opportunities Bug

    well it worked on both search bars actually. I just had another filter running which is why it idnt come up.

    Works very well but still a bit of a muckaround telling 20 employees how to search when they should be able to just type in anything and have something come up.

    So if anyone can walk me through editing the PHP, I would be very gratefull. Thanks.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Users - Bug: Searching shows wrong results
    By malcolmh in forum Help
    Replies: 0
    Last Post: 2006-09-11, 09:41 AM
  2. Create Opportunities / User Modify Bug
    By eron123 in forum Help
    Replies: 2
    Last Post: 2006-03-02, 06:56 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •