I've mostly used Feeds Tamper when I'm building a few importers which hook entities up together with references of various sorts and I've always been puzzled by the lack of a generic "convert this GUID to an ID" plugin.

My concern with writing this plugin today, for example, was creating OG group nodes and then creating users and assigning them to the groups. Using this plugin (followed by the "explode" plugin to turn the single value into an array) and assigning the result to the "Group membership" field and it just works.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

thsutton’s picture

Patch to add a "Lookup ID from GUID" plugin attached.

thsutton’s picture

Status: Active » Needs review
kenorb’s picture

kenorb’s picture

Issue summary: View changes

Added description of motivation.

estrejlau’s picture

Issue summary: View changes
FileSize
1.8 KB

Thank you for this plugin/patch. I do want to point out that in the callback, there is no passed parameter or creation of $guid. The patch here uses the $field as the GUID by which to be searched. I hope this helps.

twistor’s picture

Status: Needs review » Closed (duplicate)

Any Feeds target that can map to an entity should have an option to associate it by GUID.
If there isn't an option, please create a Feeds issue.

Also note, that this plugin exists.

#1647802: Plugin: Entity Field Query finder