CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions (Moderator: Dave Greenberg) »
  • Advanced search defaults country to Localization setting
Pages: [1]

Author Topic: Advanced search defaults country to Localization setting  (Read 778 times)

mlampard

  • I post occasionally
  • **
  • Posts: 42
  • Karma: 3
Advanced search defaults country to Localization setting
January 22, 2012, 09:17:28 pm
I'm running CiviCRM 4.0.8 on Drupal 7.10.....

If I go into an advanced search and enter a value in the street address field, the result set is not what is expected. This is because the search form defaults the country to the country selected in the Localization admin page. So, for a system like ours where we have thousands of contact records that were imported in many years ago (early version 2) , a lot of those records don't have a country listed at all. Any new records we create will obviously get the default country, but the issue is really with the search criteria - the system is pre-supposing that I want only records that have the country set and I have to go in and de-select the country to return the "correct" result set.

This is confusing to the end users - most of them don't even look at the "Street LIKE '%kitchen%' ...AND...Country = 'Canada'" that is displayed on the results page when all they've asked the system to do is find them contacts who live on Kitchen Road.

I'm not sure if this was an issue before the upgrade (I upgraded from 3.2), but I've only just noticed it. My suggestion would be to de-select the country in the address section of the advanced search - I think it would make it less confusing to end users.
Cheers,
Marty.
p.s. feedback so far on 4.0.8 has been great - "...it's more Mac like..." ;-)

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Advanced search defaults country to Localization setting
January 27, 2012, 04:17:56 pm
Marty - If you have state_province_id values recorded for these addresses, then it might be pretty easy to run a SQL script that would set a country_id value in civicrm_address.

Alternatively, I think you could modify this behavior using the buildForm hook.

I don't recall hearing about this being an issue for others - but may have missed the feedback. Does the country default cause problems for other folks?
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions (Moderator: Dave Greenberg) »
  • Advanced search defaults country to Localization setting

This forum was archived on 2017-11-26.