Migrating with organic groups is fairly simple, but not very well documented online. OSU did not use Organic Groups in Drupal 6, so you will be adding content to a group rather than trying to map it over. To do this, you still need to use the addFieldMapping() function; however, you must omit the “source” argument in the function. When you do this, you must provide a default value for the field. This looks like:


You must do this for every content type you wish to assign to a group. The group_group and og_roles_permissions fields will always have the default values of 1 and 0 respectively; og_group_ref is the only field that will need to change. In this case, 492 is the gid for the Political Science Organic Group. If you are migrating content from multiple databases or putting content in multiple groups, you will need to hardcode the gid in the field each time.