Details
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.