Experimental Project

This is a sandbox project, which contains experimental code for developer use only.

Copy value from field A to B and save entity. Currently only tested with node as entity (second last argument in drush command).

This project is only a drush command and can only be executed from the command line. This module will not show up in your modules list. After you have put the module inside the modules folder run "drush cache-clear drush" for drush to pickup the new command.

Make sure you are using atleast Entity API v1.0. This module uses entity_metadata_wrapper() to fetch a field value, to set it and to save the entity. Some validation is added to ensure copying will go smooth but still be sure to do a Database backup before running this on anything except a dev. environment.

Usage:
drush fieldcopy field_a field_b bundle_name(optional) entity(optional) entity_id(optional)

Project Information