ssossossosso

Forums

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

Forums OroPlatform OroPlatform – How do I? Questions Default Filtering Doesn't Work

This topic contains 3 replies, has 2 voices, and was last updated by  attenzione 1 year, 7 months ago.

  • Creator
    Topic
  • #62653

    attenzione
    Participant

    Hello!
    I’m new in ORO, I really like the way it is written, but something about datagrid.yml are really hard for me.
    Currently I’m developing a few new features for the TaskBundle.

    What I’ve done:
    1. I successfully extended the TaskBundle according to the docs, works fine
    2. Created datagrid.yml in my new module and changed the sorting rules there, works fine
    3. Tried to set default filtering for the dueTime column (orifinal datagrid name is tasks-grid). I have to show by default only tasks with dueDate no more then now + 1 hour. I was looking for solutions and tried both:
    https://www.orocrm.com/forums/topic/default-for-date-in-datagridfilter#post-4466
    https://www.orocrm.com/forums/topic/default-filter-for-datagrids-cant-be-cleared
    Unfortunately nothing works for me. dueTime is a datetime field. So now my code is something like this (any other files may be considered as unchanged or unextended):

    And it doesn’t work. The docs don’t contain anything about it, but I really need it.
    Thanks for your help in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #62654
    Mike Kudelya
    Mike Kudelya
    Moderator

    Hi,

    We will prepare fix on next release. I’m investigating the problem to give you hot fix.


    #62655
    Mike Kudelya
    Mike Kudelya
    Moderator

    Please extend this file vendor/oro/platform/src/Oro/Bundle/FilterBundle/Grid/Extension/OrmFilterExtension.php and replace this function with following code:

    Also you must extend and replace 125 line in vendor/oro/platform/src/Oro/Bundle/FilterBundle/Resources/public/js/collection-filters-manager.js

    with following code:


    #62656

    attenzione
    Participant

    Thanks guys, this fix works for me.

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

You must be logged in to reply to this topic.

ssossossosso