OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums 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 7 years, 9 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #36251

    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://oroinc.com/orocrm/forums/topic/default-for-date-in-datagridfilter#post-4466
    https://oroinc.com/orocrm/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
  • #36252

    Mike Kudelya
    Participant

    Hi,

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

    #36253

    Mike Kudelya
    Participant

    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:

    #36254

    attenzione
    Participant

    Thanks guys, this fix works for me.

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

The forum ‘OroPlatform – How do I? Questions’ is closed to new topics and replies.

Back to top