Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-16227

Relative date filter "Last Month" needs to be fixed

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.6
    • Fix Version/s: 4.6.2
    • Component/s: CiviCRM Search, CiviReport
    • Labels:
      None
    • Documentation Required?:
      None

      Description

      The relative date filter "Last Month" is not working correctly.

      When I ran a query using that filter on 30 March 2015, the interval it resolved to was 3/3/2015 12:00:00AM to 30/3/2015 11:59:59PM. This is only 28 days.

      When I ran a query using that filter on a 1 April 2015, the interval it resolved to was 2/3/2015 12:00:00AM to 1/4/2015 11:59:59PM. This is 31 days.

      It looks like there is some error in the logic arising from the fact that the month preceding my March run date was February which had 28 days this year.

      I could look at the code and correct it, however I think it is unlikely that anyone can be using this filter in smart groups or reports, and we are planning on creating a new system for these filters, so I would prefer just to delete it ASAP.

      Is that acceptable?

        Attachments

          Activity

            People

            • Assignee:
              kurund Kurund Jalmi
              Reporter:
              jchester Joanne Chester
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: