Posted by mikeryan on June 24, 2011 at 4:12pm
2 followers
Jump to:
| 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
Done! That was easy (don't be fooled by the size of the diff, most of it is due to indentation).
#2
Automatically closed -- issue fixed for 2 weeks with no activity.