ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 4 replies, has 2 voices, and was last updated by Stepan Yudin Stepan Yudin 9 months, 2 weeks ago.

  • Creator
    Topic
  • #24338
    Stepan Yudin
    Stepan Yudin
    Participant

    Good day everyone!
    Today i’ve stuck with 3 issues:

    1) Can we define sorting order or query builder for ‘oro_jqueryselect2_hidden’ type? (and for ‘oro_entity_create_or_select_inline’)

    2) If i use autocomplete input in this form type then matched results are understroked, but non-matched results are still shown. Is there any possibility to hide non-matching results?

    3) This field functionality depends on entity search config. Here is one limitation: if i type on;y the part of word – then nothing will be found.
    For example $entity->__toString() = ‘My Very Special Entity’. If i type ‘pecial’ – then the entity will not be found.
    Is there any way to tweak search engine to look for parts of words?


    Docker environment for Symfony2/OroCRM/OroBAP development on Windows platform
    https://github.com/stepansib/sf-oro-docker

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #24410
    Mike Kudelya
    Mike Kudelya
    Oro Core

    Hi

    1) I have tried sort Account result on opportunity edit page. Here is sorting call:

    i put it there. As variant you can create your own autocomplete handler with overridden searchIds function. Autocomplete alias must be set in autocomplete_alias property.

    2) I’m not really understand your question. Can you describe more detail, please ? For me, when entity data doesn’t match search query it doesn’t appear on select2 field.

    3) Unfortunately our autocomplete doesn’t search in substring. Create own autocomplete handler and try to search via mysql fulltext search.

    #24647
    Stepan Yudin
    Stepan Yudin
    Participant

    Thank you Mike! I realy appreciate your help in community support)

    1) Gotcha, it works!
    2) Take a look at the sreenshot: screenshot Matched record is understroked, but not-matched are still shown
    3) Will try next week, thank you. Will post solution snippet here


    Docker environment for Symfony2/OroCRM/OroBAP development on Windows platform
    https://github.com/stepansib/sf-oro-docker

    #24656
    Mike Kudelya
    Mike Kudelya
    Oro Core

    Hi

    2) There are two things that do not allow get what you want.

    By default ft_min_word_len=3, search is ignoring your numbers in search. I have changed it to 1.

    Also i have changed this line to:

    I think you can play with this boolean operators. More information you can find there.

    #24657
    Stepan Yudin
    Stepan Yudin
    Participant

    Thank you for explanations, Mike!

    Now i implemented searchIds() method to use simple QueryBuilder with LIKE operator and everything works good.
    When i’ll finish reading mysql fulltext docs – i’ll implement it properly)


    Docker environment for Symfony2/OroCRM/OroBAP development on Windows platform
    https://github.com/stepansib/sf-oro-docker

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.