CRM-1718 Advanced Search - Change Log Search is Broken

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 2.0
    • Fix Version/s: 1.7, 2.0
    • Component/s: None
    • Labels:
      None

      Description

      Search on Change Log by date range isn't doing the right thing.

      Example: on http://dgg.devel.civicrm.org

      • Advanced Search - Change Log: Modified Between Mar 19 2007 - Mar 21 2007
      • Qill:
        Found 2 contacts
      • Modified Date - greater than "March 19th, 2007" ... AND ...
      • Modified Date - less than "March 21st, 2007"

      However, looking at Change Log details for one of the two (cid=108), last change was Mar 11, 2007

      Queried civicrm_log - and found that the problem is as follows:

      • Code query is returning 2 records in civicrm_log
        ------------------------------------------------------------------+
        id entity_table entity_id data modified_id modified_date

        ------------------------------------------------------------------+

        163 civicrm_individual 108 NULL 102 2007-03-20 09:58:53
        162 civicrm_contact 135 NULL 102 2007-03-20 09:58:53

      ... one for civ_individual record and one for civ_contact record. It should be ignoring the civ_indiv record - but instead is evaluating that as a civicrm_contact.id

      Separately, I would recommend that the query be changed to ">=" the "from" date (rather than ">"), and "<= 'yyyymmdd 23:59'" on the end range date. So if I want to find things modified on a given day I can put in that single date as From and To.

        Attachments

          Activity

          [CRM-1718] Advanced Search - Change Log Search is Broken
          Donald A. Lobo added a comment -


          Fixed. the query has also been changed to search for the end of the day for ALL date queries

          Piotr Szotkowski added a comment -

          Make the issue unverified for 1.8.

          Piotr Szotkowski added a comment -

          Assigning to Pankaj for 1.8 verification.

          Manish Zope added a comment -

          Reopening for verification for 2.0

          Yashodha Chaku added a comment -

          Advance Search for Change Log yields :

          Database Error Code: Column 'sort_name' in order clause is ambiguous, 1052

          Manish Zope added a comment -

          Reassigning to Kiran for 2.0 verfication

          Kiran Jagtap added a comment -

          When click on search button in Advance search,It gives Fatal error.

          Kurund Jalmi added a comment -
          • fixed in rev 12778
          • reassigning for verification
          Shailesh Lende added a comment -

          Tested and verified for 2.0 r-12801.

            People

            • Assignee:
              Shailesh Lende
              Reporter:
              David Greenberg

              Dates

              • Created:
                Updated:
                Resolved: