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

Views built in civievent do not sort by start_date properly

    Details

      Description

      When sorting by start_date, the default views_handler_sort_date function is used. This Drupal function wraps the start_date field in a FROM_UNIXTIME() function because it expects the database to be storing the date as a unix time stamp.

      However, civievent stores the date as a datetime field, which causes the FROM_UNIXTIME function to return null.

      Civicrm 3.0 comes with a civicrm_handler_sort_date override that fixes the problem, but that override is not being called.

      The attached patch seems to fix the problem (the attached patch fixes this problem for all civi date fields, not just civievent).

      jamie

        Attachments

          Activity

            People

            • Assignee:
              neha.saraph Neha Kulkarni
              Reporter:
              jamie Jamie McClelland
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: