This is a two-part Kata.
Part one, for Drupal Noobs, explores Features for D 6.x: what's Features, why use it, let's do an example creation, export and import.
Part two, for Drupal Geeks, explores Features for Open Atrium: how do you port a D6.x feature to Atrium, whats different in the OA version of Features, and how to you work with Context and Spaces to get the thing in the menu?
I. STANDARD DRUPAL 6.x
PRE-FEATURE WORK: This is building the site before creating the feature.
- COMPLETE PREPARATIONS: If you did not complete this before the workshop, do it now. Take a demonstration site snapshot called "Prepared-Site" and skip to section 3.
- CREATE THE PRE-FEATURES ENVIRONMENT
- Create the Content Types Group (type = Group Node) and Commitment (type = Standard Group Post)
- Import the CCK Definition for Commitment using CCK Import/Export
- Import the GROUP and COMMITMENT Nodes with Node Import
- Optional: Run the SQL INSERT QUERY for the "Completed" Flag
- Import the Commitments View using standard Views Import
- Test the Commitments View - there will be missing flags if you did not do the Optional step in Pre-Features work.
- Take a Demonstration Site Snapshot and call it "Pre-Features" (site building / demonstration site)
FEATURE WORK: This is building the feature.
- CREATE THE FEATURE
- Create the Feature (note what it does and does not contain) as beta
- Download the Feature (should go to your hard drive as a tgz file)
- Move the Feature File to sites/default/modules for your D6.x install.
- Expand the module (folder = "commitments") - just make sure it's there and has files in it.
- Revert to "Prepared-Site" - this means all the work you've just done by hand will be gone, but the features module you created will re-do it automatically.
- Create the Feature (note what it does and does not contain) as beta
- ENABLE THE FEATURE
- Enable the feature. This will turn on all the modules, create the content types and views.
- Your Feature will NOT cover NODE IMPORT or FLAGS, so repeat steps 2.3 and 2.4 in PRE-FEATURES WORK.
- Test the Commitments View - there will be missing flags if you did not do the Optional step in Pre-Features work.
- Recreate the feature - Add the Commitments module as a dependency (you couldn't do that before).
- Download the Feature as version 1.0 since you've just tested it.
II. OPEN ATRIUM PREPARATION
(OA PREP:
- Disable Mail to Web
- Enable Demo Site Module
- Enable parser if you get that error
- Set Snapshot )
1. OA THEME MODIFICATIONS: Open Atrium's theme requires these mods to show a Commitments menu item.
- handshake.png (from Required Files)

- styles.css
#features-menu li a.icon-commitments span.icon {
background: url(handshake.png) no-repeat;
} - commitments.module has extra code to enable stylesheets:
function commitments_init() {
$path = drupal_get_path('module' ,'commitments');
drupal_add_css($path.'/style.css');
}
2. MORE OA MODIFICATIONS: OA uses Context and Spaces; our D 6.x did not.
- commitments.defaults.inc has these additions for context and spaces:
- commitments.info has these additions for context and spaces:
features[content][] = "commitment-field_commitment_deadline"
features[context][] = "spaces-feature-commitments"
spaces[types][] = "og"
3. TEST MODIFICATIONS:
- Place Feature Folder in /sites/default/modules
- Enable Feature
- Import Group Node and Commitment Nodes
- Enable Space; check for Menu Item
- Run Flags SQL (which will also fix the og_acces_post missing table error if you have it)
- Test the Commitments View (click the menu item)