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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • address lookup on import
Pages: [1]

Author Topic: address lookup on import  (Read 806 times)

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
address lookup on import
May 02, 2011, 10:54:54 pm
currently, if you are using the USPS address lookup it will be triggered during contact import.
since the USPS webtools api is not supposed to be used for bulk processing, we really shouldn't be running it during contact import.

i propose the following mod:
CRM/Core/BAO/Address.php
around line 315:

Code: [Select]
$urlpath = explode( '/', CRM_Utils_System::currentPath() );
if ( ! empty( $asp ) && $urlpath[1] != 'import' ) {

this will prevent it from being used when using the importer.
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: address lookup on import
May 03, 2011, 06:39:46 am

we'll need to do a few things:

1. One option might be to hook it into the geocoding option and if geocoding option is disabled do not do USPS lookups either (that way the user has some control and might want to do so for smaller files)

2. We'll also need to provide an alternative for batch USPS address correction in UpdateAddress.php to format the addresses that were not formatted (this might be a bit harder, since we dont keep track of what addresses were sent)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: address lookup on import
May 03, 2011, 07:33:18 am
i think adding the option to the import process would make sense.
but it should be distinct from geocoding. they are separate and distinct processes.

i don't believe UpdateAddress handles the USPS lookup.
from a quick review, i think it just has the option of handling the geocode and address parsing
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: address lookup on import
May 03, 2011, 10:58:28 am

Yes, we'll need to extend UpdateAddress to do so. Should not be too hard

Any interest in submitting a patch for this

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • address lookup on import

This forum was archived on 2017-11-26.