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

Problems with searching Contacts and Date Range using Profiles

    Details

    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding

      Description

      I have a custom Contact Reference field and a custom Date field on a Profile. I can enter records using the profile just fine. However, when I try to search for the Contact, it always returns no results, because it does not seem to be passing the contact I choose. For example, when I choose a contact in my "Test Contact" field, here are the results it shows:

      No matches found for:
      Contacts IN Summer Program Volunteers AND Group Status - "Added" ...AND...
      Test Contact =

      Note that it says "Test Contact =" not "Test Contact = Alice Jameson's home" (the contact I selected).

      I also have a date field (formated at mm/dd/yyyy hh:mm am/pm) that is entered using a Profile, and I have it set to search based on a range. However, if I enter a from date as 02/07/2012 10:00 am and a to date as 02/07/2012 5:00 pm, even though I have results in this range, it shows no results, and the search criteria is wrong:

      No matches found for:
      Contacts IN Summer Program Volunteers AND Group Status - "Added" ...AND...
      Test Date >= February 7th, 2012 12:00 AM ...AND...
      Test Date <= February 7th, 2012 12:00 AM

      Note that it says 12:00 AM for both the from and to time, even though I entered 10:00 am and 5:00 pm.

      I set up a profile on http://sandbox.joomla.civicrm.org/ just to see if the bug was reproducible with the latest code, and it is. Here's my profile create form:

      http://sandbox.joomla.civicrm.org/administrator/?option=com_civicrm&task=civicrm/profile/create&gid=10&reset=1

      Here's the search form that is not working correctly:

      http://sandbox.joomla.civicrm.org/administrator/?option=com_civicrm&task=civicrm/profile/search&gid=10&reset=1

      I talked with "dlobo" in IRC, and he thought this is a missing feature with searching of custom data. I may try to create a patch for this, and will submit it if I do, but I wanted to submit this bug in case I don't get around to it soon.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              cnasal Carl Nasal
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: