OFBiz
  1. OFBiz
  2. OFBIZ-4374

Support filtering on non-std date field names in performFind and prepareFind

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Implemented
    • Affects Version/s: Trunk
    • Fix Version/s: Upcoming Branch
    • Component/s: framework
    • Labels:
      None
    • Environment:

      REV 1152668

      Description

      I had a need to filter by date ranges for entities that didn't follow the standard fromDate and thruDate field-naming pattern. I therefore enhanced prepareFind and performFind services so they could be passed the names of the fields to use in place of fromDate and thruDate when the filterByDate option was chosen. Thought this might be useful to others, even though it isn't currently used in OOTB code.

        Activity

        Hide
        Nicolas Malin added a comment -

        With some lucky the patch has been applied on trunk without error.

        I commit it on trunk at revision 1655499 with code reformatting and junit test.

        With the difficulty to test, I create a new test-suite performfindtests with five junit :

        • testPerformFindConditionFieldEquals
        • testPerformFindConditionFieldLike
        • testPerformFindConditionDistinct
        • testPerformFindFilterByDate
        • testPerformFindFilterByDateWithDedicateDateField
          I also improve TestNodeMember with two fields extendFromDate and extendThruDate to realize filter on it.

        Thanks Anne for your issue

        Show
        Nicolas Malin added a comment - With some lucky the patch has been applied on trunk without error. I commit it on trunk at revision 1655499 with code reformatting and junit test. With the difficulty to test, I create a new test-suite performfindtests with five junit : testPerformFindConditionFieldEquals testPerformFindConditionFieldLike testPerformFindConditionDistinct testPerformFindFilterByDate testPerformFindFilterByDateWithDedicateDateField I also improve TestNodeMember with two fields extendFromDate and extendThruDate to realize filter on it. Thanks Anne for your issue
        Hide
        Anne Jessel added a comment -

        Replaced git-format patch with svn-format patch, against REV 1160087.

        Show
        Anne Jessel added a comment - Replaced git-format patch with svn-format patch, against REV 1160087.

          People

          • Assignee:
            Nicolas Malin
            Reporter:
            Anne Jessel
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development