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 »
  • Usability Improvements (Moderator: Dave Greenberg) »
  • the title import/export mappings is not clear sentence
Pages: [1]

Author Topic: the title import/export mappings is not clear sentence  (Read 1699 times)

businessbroker

  • Guest
the title import/export mappings is not clear sentence
March 16, 2010, 08:00:41 am
Today I'm gone here civicrm/admin/mapping&reset=1 to export the saved apping of fields for my import contacts, hoping to be able to export it for another civicrm setup, but then i discovered that this section is born only to edit and delete these mappings as showed here too:
http://wiki.civicrm.org/confluence/display/CRMDOC/Import-Export+Mappings
I suggest to reane this section into : edit/delete mappings
and I suggest also to add another section named Import/Export mappings to be able to import and export the mappings of fields from a civicrm to another.

gharris

  • I post occasionally
  • **
  • Posts: 32
  • Karma: 0
  • CiviCRM version: new
  • CMS version: new
  • MySQL version: new
  • PHP version: new
Re: the title import/export mappings is not clear sentence
March 03, 2015, 01:24:14 pm
I realize that this is ancient, but I still can't find anything on this.  Ideally, the Import/Export Mappings page would have a set of check boxes for mass deletion and exporting of these fields.  Additionally, this page would have an import feature to pull the mappings in from another site.  This would make the move from a dev environment to production simple.

Somewhat related, using Xavier's CLI Import/Export/Delete API, I'm having a killer time trying to find what Entity these mappings would be stored under.  Does anyone have any direction that they can give?

I wish I could just go in and program it, but I'm not there yet.

gharris

  • I post occasionally
  • **
  • Posts: 32
  • Karma: 0
  • CiviCRM version: new
  • CMS version: new
  • MySQL version: new
  • PHP version: new
Re: the title import/export mappings is not clear sentence
March 04, 2015, 12:24:41 pm
Ok, so digging into this further, there are number of *_type_id fields in the civicrm_mapping_field table which are all foreign keys.  So, as an example:
civicrm_mapping_field.relationship_type_id is a foreign key to civicrm_relationship_type.id. 

I can successfully export a specific id from civicrm_mapping and the corresponding civicrm_mapping_field rows, utilizing a query on the civicrm_mapping_field.mapping_id field.  From that, I can grab any non-standard, or otherwise needed, *_type_id foreign keys.  Exporting those civicrm_*_type records and importing them works fine.  I can now run the same import on both servers with the same file, using the same mapping.  I can even do groups of mappings, provided I find all the missing pieces.  However, there is a tremendous amount of manual work grabbing all of the corresponding *_type.id records.  Additionally, this leaves gaps in the assigned ID's, which scares me a bit since I don't know how ID's are autocreated and if that will later cause an issue.

Maybe I'm asking for implementer trade secrets here, but how do you manage to bring specific mappings from your Dev environment into the production environment and vice versa?  I know I will end up with stuff in the Dev server that I won't want/need or is ready for in Production.

As an aside, here's the SQL for grabbing the mapping and mapping_field records for a specific mapping:
SELECT *
FROM `civicrm_mapping`
WHERE `id`
IN ( Put,the,wanted,id,here,comma,separated,for,each,mapping )

SELECT *
FROM `civicrm_mapping_field`
WHERE `mapping_id`
IN ( this,is,the,same,list,as,above )

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions »
  • Usability Improvements (Moderator: Dave Greenberg) »
  • the title import/export mappings is not clear sentence

This forum was archived on 2017-11-26.