Download & Extend

Add fid-based file_function to file handler

Project:Migrate
Version:7.x-2.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:mikeryan
Status:closed (fixed)

Issue Summary

If you're using MigrateDestinationFile to import files (as I am at the moment), and you want to attach those files to file fields in later migrations (indeed I do), it would be convenient to just pass the fids mapped from the file migration into the file field:

<?php
    $this
->addFieldMapping('field_attachments', 'ATTACHMENTID')
         ->
sourceMigration('Attachment')
         ->
arguments(array('file_function' => 'file_fid'));
?>

Just creating an issue to reference in the commit and CHANGELOG...

Comments

#1

Status:active» fixed

Done! That was easy (don't be fooled by the size of the diff, most of it is due to indentation).

#2

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.