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) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Import date created and/or date modified?
Pages: [1]

Author Topic: Import date created and/or date modified?  (Read 1425 times)

jamie

  • I post occasionally
  • **
  • Posts: 95
  • Karma: 6
Import date created and/or date modified?
April 15, 2009, 07:50:21 am
We're importing thousands of contacts from a previous database that recorded the date modified and date created. These are available in our CSV file, but I don't see a way to map those fields to a corresponding field in CiviCRM during the import process. I imagine it's because CiviCRM is using a different system for logging this info (via the civicrm_log table). Does anyone have suggestions for how to preserve this information duing the import? Any post import scripts that we could run?

Thanks!

jamie

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Import date created and/or date modified?
April 15, 2009, 08:09:07 am
Currently I don't think you can map date modified and created suing Import. There is also no interface for modifying these dates.

Kurund
Found this reply helpful? Support CiviCRM

jamie

  • I post occasionally
  • **
  • Posts: 95
  • Karma: 6
Re: Import date created and/or date modified?
April 15, 2009, 08:38:23 am
Thanks Kurund for the quick response!

Would you for see any problems if I were to run a script after the import that iterates over the original CSV file, looks up the assigned contact_id (based on the External ID imported), and then manually updates the civicrm_log table with two records (one for the date created and one for the last modified)?

jamie


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: Import date created and/or date modified?
April 15, 2009, 09:40:23 am

jamie:

that will work quite nicely and fits our model of recording change date/time

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) »
  • Support »
  • Using CiviCRM »
  • Using Import (Moderator: Yashodha Chaku) »
  • Import date created and/or date modified?

This forum was archived on 2017-11-26.