Project Flow & Tracker Paris: The Making of (late 2009)

You've reached Project Flow & Tracker Central

In depth: Project Flow & Tracker to be rebuilt on Open Atrium - Part 1

Based on the principles of ideas and architecture over coding, community based collaboration over individual and isolated effort, I have decided to redo my Project Flow & Tracker agile based project management tool based on the new Open Atrium "do-it-yourself project" kit. Not only do I get a huge kick in the butt for starters, but I can give back all the new functionality I develop as shareable features. Talk about win-win!

What's all the fuss about Open Atrium?

Open Atrium is described as "Part intranet, part do-it-yourself project...". Heading over to the Open Atrium home page, I clicked on Features and watched the video. The video shows what you get out of the box (group-based sections, each with its own subset or complete set of features: Blog, Calendar, Group Dashboard, Documents arcive, Shoutbox (private twitter), Case Tracker (issue tracking system); each feature can be enabled in private (group scope) or public mode. Very impressive.

Then I read "The fun really starts when people start sharing the features they build for their own Open Atrium with everyone else. Then everyone doesn't just have access to six features but also a bunch of others that are easy to plugin to the basic Open Atrium package." And there are going to be feature servers, and it sure sounds like some good clean fun is happening.

But, what are features, apart from... obviously being features?

It's all about features!

Drupal has always been a building block, toolset type of website application framework, and the Content Construction Kit (CCK) and Views modules have been allowing us to implement custom form-based persistible content types and listings of those content types for a long time now. One of the great things about these modules is that when you implement a content type or a view, you can export it into a text file that can be placed under version control and easily deployed by being imported into another Drupal website application.

It turns out that features wraps this same "export/import" goodness  around a lot of other stuff, so you can work in terms of bringing together components (CCK fields, Views, configurations, custom code) into a nice manageable, deployable bundle called... a feature.

A component that has this characteristic is said to have "exportables".

This whole system, forming the heart of Open Atrium, is built around a whole series of modules (features, context, spaces) and fits in with an exciting new set of packing and deployment tools (drush, etc.) being discussed at http://groups.drupal.org/packaging-deployment and forming part of the larger scoped http://groups.drupal.org/aegir-hosting-system.

It looks like the classic Drupal problem of how to deploy work done on a development site to a production site without disturbing its content (both being database based) may be on its way to being solved once and for all.

Kathleen Murtagh (ceardach) has spearheaded a lot of work in this area with her famous Database Scripts. As she puts it on that project page:

"These scripts will become obsolete when an improved system is implemented. There will be no silver bullet, however, many projects are being developed to help: Patterns, CoCKTaiL, Context, Spaces, Deploy. There is also a movement to implement import/export for all configuration options: Exportables, Features. Until all configuration options across all of Drupal and contrib are supported, these scripts will be here for you to help you migrate configuration settings."

So looking over the Open Atrium documentation, with emphasis on the How to Build a Feature section (more on this below), I decided right then and there to go reverse engineer my Project Flow & Tracker on OpenAtrium! First of all it seems like a really fun and painless way of trekking through this cool package and deploy jungle. Secondly, I just don't have time to build Project Flow & Tracker from scratch; and now I can contribute my own features (agile approach interface for projects; hierarchical multiple views on project, iterations, features (huh?), user stories, roles, tasks, issues; bidirectional traceability from requirements to iterations to user stories to tasks, on through to version control commits, etc) back to the community as I go!

And, needless to say, blogging about my progress every few days right here!

First steps towards Open Atrium based and feature shareable Project Flow & Tracker goodness

I downloaded the 6.3 MB tarball from the link ( http://openatrium.com/sites/openatrium.com/files/atrium_releases/atrium-... ) on the Open Atrium home page and untarred it as ./atrium-1-0-beta1 under a convenient project directory. I then carried out the following command to get a clean "atrium" directory I could then symbolically link to new untarred versions (and then hopefully update by exporting and importing features? looking forward to finding out):

$ ln -s atrium-1-0-beta1/ atrium

I then created a database and a virtual host and pointed my browser at the appropriate URL. As is the case with any regular Drupal install, the opening page asks you to select an installation profile, so I chose "Atrium by Development Seed" rather than default Drupal. I clicked on the Save and continue and button and the next screen asked me which language (out of English, Arabic and Spanish) to select. I chose English and clicked on the Select language button.

The rest of the install went as per any Drupal installation except that after filling in the database and basic site info, Atrium was installed, including a bunch of third-party modules. Then there was an Atrium installation complete page, saying that ./sites/default/files/pictures had been created and that the content permissions had been rebuilt. I was congratulated and sent along to my new site.

 

In the next article I will share with you my first explorations of this test Atrium site, and then the basics of the development environment I set up for rebuilding Project Flow & Tracker on top of this exciting framework.

 

Project Flow & Tracker "Paris" bursts into life as a feature - Part 2

Dedicated to the compadres at #drupalcampla http://2009.drupalcampla.com/

Today we witness the birth of PFT "Paris" as a feature, that is, based on the Open Atrium compatible features family of modules which promise plug and play feature components for Drupal. It should also serve as a useful tutorial on how to get started with features (and a smidgeon of drush and bzr too!). And you can download the whole shebang and enjoy Project Flow & Tracker lite. What we'll do:

At the end of the previous article in this series I had already installed Open Atrium, and was all set to start working with a new feature. So today we take up where we left off.

Scrum, WIP, GTD, oh my

There has been a lot of talk in recent times about what I would term "here and now" project (life?) manager approaches (such as GTD: Getting Things Done),  as people are recognizing that the times of most productivity one has is when one is focused on a task at hand, running with the ball, in the swim... and that means, less time lurking in the interstices of the backlog and more time spent on WIP (work in progress).

Whereas I am still convinced that iterations have a big role to play, all of this will have a profound affect on the usability of Project Flow & Tracker "Paris": no matter what you are doing, there will always be a WIP view... no need to reduce everything to WIP if you can always have a view. Anyway, we will come back to this debate in actual practice sooner rather than later in this series of articles.

Let's get started with features!

OK, let's get to the meat. On the Open Atrium site, if you click on the Features area you are taken to a listing of the features already bundled with the initial beta release.  There it says:

"If you want a feature that's not on that list, you can add it yourself. Read the documentation, specifically the How to Build a Feature section, to find out how to do it."

OK, that's what we want, to build a feature. Clicking on the howto link, we read:

  1. Build feature (CCK, Views, Context, etc. and exported using Features module), can be done on non-atrium site
  2. Add feature and dependency modules to codebase in admin/modules/contrib and admin/modules/features
  3. ...

The rest of the points will be very useful when it comes time to install our features based component on Open Atrium and take advantage of all the spaces goodness, etc.; but not much is said here about features themselves: "can be done on non-atrium site" kind of sticks out.

We are directed to watch Making and Using Features in Drupal. Which in turn links to a really good features background article on the Development Seed site, which was published when the Features module first came out in May. You might want to take a moment to read that article and watch that video before continuing here. I know I did (wow, that video went by fast...). But I will be explaining what I am doing in my example here step by step: What we are going to do now is install a fresh open atrium and create the feature independently, and step by step.

Starting development environment

For everything we are going to do here, we need drush. You need drush. We all need drush. Fastest way to a bottle of beer. If at this point you are not yet drush enabled, click here .

I'm kind of interested in finding out about using Bazaar as my initiation into distributed version control systems, but Open Atrium (along with Linux and a heck of a lot of other interesting projects often hosted at github) can be checked out directly from its Git repository. In order to avoid complications (best practices are said to follow a cloning of the Open Atrium project as a basis for a development environment, but I want to keep things simple, and also want to keep Project Flow & Tracker as a feature set that can be installed from drupal.org on any Drupal site), I am going to check out open atrium anonymously (so I can easily update to future releases), and then version Project Flow and Tracker as an indpendent Git sub module (one way to emulate the SVN vendor branch thing).

And as it turns out, to appreciate the generation of a features based component, its packaging as  a tarball, and its installation and enabling on the target site, we actually need two sites set up, one as a "features machine" (features generator), and the other Project Flow & Tracker just waiting to be born by having its features, well, seeded and enabled. Both sites of course could be Open Atrium based, because obviously that comes with the right set of modules to work with features. But just to show exactly what is required, and to maintain that comfortable feeling that comes from knowing it could be installed onto any Drupal 6 site having the proper dependencies installed and be converted it into an installation profile publishable right on good old http://drupal.org, let's build our features generator from scratch!

Features Machine

Mosey on down to a suitable workspace and type:

$ drush dl drupal
Project drupal (6.13) downloaded to /home/victorkane/...... . [success]
$ ls -l
drwxr-xr-x 9 victorkane victorkane 4096 2009-07-01 17:55 drupal-6.13
$ mv drupal-6.13/ features
$ ls -l
$ drwxr-xr-x 9 victorkane victorkane 4096 2009-07-01 17:55 features

I went ahead and installed a basic Drupal instance and pointed my browser at the new URL to carry out the install. Once I was welcomed to my new Drupal site, using drush, I set up all the necessary modules (with a few obvious hints from http://developmentseed.org/blog/2009/jun/26/recipe-feature-server even though I am not out to build a features server here):

$ drush dl cck context features diff views admin_menu

Then went in and enabled the modules (more easily done with Administer > Site building > Modules than with drush enable {module} due to multitude of sub modules, etc) and wound up with the following:

$ drush statusmodules
Name Enabled/Disabled Description
Administration menu (admin_menu) Enabled Provides a dropdown menu to most administrative tasks an ...
Aggregator (aggregator) Disabled Aggregates syndicated content (RSS, RDF, and Atom feeds).
Block (block) Enabled Controls the boxes that are displayed around the main co ...
Blog (blog) Disabled Enables keeping easily and regularly updated user web pa ...
Blog API (blogapi) Disabled Allows users to post content using applications that sup ...
Book (book) Disabled Allows users to structure site pages in a hierarchy or o ...
Color (color) Enabled Allows the user to change the color scheme of certain th ...
Comment (comment) Enabled Allows users to comment on and discuss published content.
Contact (contact) Disabled Enables the use of both personal and site-wide contact f ...
Content (content) Enabled Allows administrators to define new content types.
Content Copy (content_copy) Enabled Enables ability to import/export field definitions.
Content Permissions (content_permissions) Enabled Set field-level permissions for CCK fields.
Context (context) Enabled Provide modules with a cache that lasts for a single pag ...
Context Contrib (context_contrib) Enabled Provides integration with Context on behalf of the follo ...
Context UI (context_ui) Enabled Provides a simple UI for settings up a site structure us ...
Database logging (dblog) Enabled Logs and records system events to the database.
Diff (diff) Enabled Show difference between node revisions.
Features (features) Enabled Provides feature management for Drupal.
Fieldgroup (fieldgroup) Enabled Create display groups for CCK fields.
Filter (filter) Enabled Handles the filtering of content in preparation for display.
Forum (forum) Disabled Enables threaded discussions about general topics.
Help (help) Enabled Manages the display of online help.
Locale (locale) Disabled Adds language handling functionality and enables the tra ...
Menu (menu) Enabled Allows administrators to customize the site navigation menu.
Node (node) Enabled Allows content to be submitted to the site and displayed ...
Node Reference (nodereference) Enabled Defines a field type for referencing one node from another.
Number (number) Enabled Defines numeric field types.
OpenID (openid) Disabled Allows users to log into your site using OpenID.
Option Widgets (optionwidgets) Enabled Defines selection, check box and radio button widgets fo ...
Path (path) Disabled Allows users to rename URLs.
PHP filter (php) Disabled Allows embedded PHP code/snippets to be evaluated.
Ping (ping) Disabled Alerts other sites when your site has been updated.
Poll (poll) Disabled Allows your site to capture votes on different topics in ...
Profile (profile) Disabled Supports configurable user profiles.
Search (search) Disabled Enables site-wide keyword searching.
Statistics (statistics) Disabled Logs access statistics for your site.
Syslog (syslog) Disabled Logs and records system events to syslog.
System (system) Enabled Handles general site configuration for administrators.
Taxonomy (taxonomy) Enabled Enables the categorization of content.
Text (text) Enabled Defines simple text field types.
Throttle (throttle) Disabled Handles the auto-throttling mechanism, to control site c ...
Tracker (tracker) Disabled Enables tracking of recent posts for users.
Content translation (translation) Disabled Allows content to be translated into different languages.
Trigger (trigger) Disabled Enables actions to be fired on certain system events, su ...
Update status (update) Enabled Checks the status of available updates for Drupal and yo ...
Upload (upload) Disabled Allows users to upload and attach files to content.
User (user) Enabled Manages the user registration and login system.
User Reference (userreference) Enabled Defines a field type for referencing a user from a node.
Views (views) Enabled Create customized lists and queries from your database.
Views exporter (views_export) Enabled Allows exporting multiple views at once.
Views UI (views_ui) Enabled Administrative interface to views. Without this module, ...

Decided to use Bazaar distributed version control to work with this project, so did the following (See Bazaar in five minutes):

$ drush sql dump > sites/all/backup/db/features.sql
$ bzr init
Created a standalone tree (format: pack-0.92)
$ bzr add
[ bzr added all the files ] ...
adding sites/all/modules/cck/modules/fieldgroup/panels/content_types/content_fieldgroup.inc
adding sites/all/modules/cck/modules/fieldgroup/panels/content_types/icon_cck_field_group.png
adding sites/all/modules/cck/modules/nodereference/panels/relationships/node_from_noderef.inc
adding sites/all/modules/cck/modules/userreference/panels/relationships/user_from_userref.inc
$ bzr commit -m "initial minimum install of features machine with context, features and other primary dependencies"
added ... [all files]
added themes/pushbutton/tabs-option-hover.png
added themes/pushbutton/tabs-option-off-rtl.png
added themes/pushbutton/tabs-option-off.png
added themes/pushbutton/tabs-option-on.png
Committed revision 1.

Setting up PFT lite

This is actually a stripped-down version of PFT I have been using successfully with many clients. A short overview of PFT lite capabilities:

  • Creating and listing roles and user stories
  • Prioritizing the user stories
  • Writing acceptance tests for each user story
  • Tracking your project

After the roles and user stories have been entered, a simple view allows for a basic tracking capability:

Tracking with Project Flow & Tracker Lite

This is plenty for many small to medium sized projects that just need to show WIP (work in progress) and where you are at in a basic burn down context.

To get it going I did the following:

  • Imported a simple user story content type
  • Created simple tag taxonomy for Roles, and apply to user story content type
  • Created simple tag taxonomy for Projects, and apply to user story content type
  • Imported the view (includes WIP primary menu entry to invoke it)
  • Populated with sample data for the Project Flow & Tracker project

And the result is:

PFT initial setup on Features Machine

 

Whoaa! We've created a bare-bones but usable PFT in its own right... There are tons of features (hmmm) left out, there is no access control, there is no features/user story/task  hierarchy, there are no project documents (although you could use the project taxonomy applied to any content type for that (books for example) and add exposed filters to the WIP view, but we'll see how that goes later on in this series of articles)

Hmmmm. So, first, we'll create the feature, download it, and it could be installed onto any D6 site having the contrib module dependencies installed. Or we could convert it into an installation profile for vanilla off-the-shelf D6 which  could be published right on drupal.org, which is comforting.

So let's see if we can get the feature going.

Exporting PFT lite as a feature

Want to save the state of the project in bzr before we go on.

$ drush sql dump > sites/all/backup/db/features.sql
$ bzr status
modified:
sites/all/backup/db/features.sql
$ bzr commit -m "PFT lite initial setup"
Committing to: /home/victorkane/Work/AWebFactory/projects/FeaturesMachine/features/
modified sites/all/backup/db/features.sql
Committed revision 2.
victorkane@victorkane:~/Work/AWebFactory/projects/FeaturesMachine/features$

We go to Administer > Site building > Features and click on the Export link. We fill in the info as follows:

exporting pft as a feature - 1

We click on the Next button. We indicate that we wish to include the user story content type and the list_user_stories view:

exporting pft as a feature - 2

We click on the Next button. Now we are asked to confirm the components, and this gives us a chance to specify any module dependencies:

exporting pft as a feature - 3

We can always update later, but for now we include basic CCK and Views stuff, and click on the Next button. We are presented with our downloadable feature:

exporting pft as a feature - 4

So we click on the Download feature button and save pft_lite-6.x-1.0-alpha1.tar.gz to our local file system (It is attached here: be sure to change the security conscious tar_.gz extension to tar.gz in order to be able to unpack the tarball).

So to finish up, let's take a look at what we have in the feature tarball, and, most importantly, let's install it in our Project Flow & Tracker site and see if it works :) (If you want to skip "seeing what we have" click here to go directly to installing it and seeing if it works).

Seeing what we have

So, inside the tarball, there is a module :)

$ tar xvzf pft_lite-6.x-1.0-alpha1.tar.gz
pft_lite/pft_lite.info
pft_lite/pft_lite.features.inc
pft_lite/pft_lite.defaults.inc
pft_lite/pft_lite.module
$ ls -gG pft_lite
total 32
-rw-r--r-- 1 20107 2009-08-09 07:26 pft_lite.defaults.inc
-rw-r--r-- 1 606 2009-08-09 07:26 pft_lite.features.inc
-rw-r--r-- 1 1398 2009-08-09 07:26 pft_lite.info
-rw-r--r-- 1 46 2009-08-09 07:26 pft_lite.module

The module info file, as alway, describes what we have:

$ cat pft_lite/pft_lite.info              
core = "6.x"
package = "Features"
project = "pft_lite"
name = "PFT Lite"
description = "Bare bones Project Flow & Tracker user story project management system"
version = "6.x-1.0-alpha1"
features[content][] = "user_story-field_us_burned_points"
features[content][] = "user_story-field_us_confirmation"
features[content][] = "user_story-field_us_conversation"
features[content][] = "user_story-field_us_points"
features[content][] = "user_story-field_us_priority"
features[content][] = "user_story-field_us_state"
features[dependencies][] = "content"
features[dependencies][] = "content_copy"
features[dependencies][] = "content_permissions"
features[dependencies][] = "menu"
features[dependencies][] = "nodereference"
features[dependencies][] = "system"
features[dependencies][] = "taxonomy"
features[dependencies][] = "user"
features[dependencies][] = "userreference"
features[dependencies][] = "views_export"
features[dependencies][] = "views_ui"
features[node][] = "user_story"
features[views][] = "list_user_stories"
dependencies[] = "content_copy"
dependencies[] = "content_permissions"
dependencies[] = "features"
dependencies[] = "menu"
dependencies[] = "node"
dependencies[] = "nodereference"
dependencies[] = "number"
dependencies[] = "system"
dependencies[] = "taxonomy"
dependencies[] = "user"
dependencies[] = "userreference"
dependencies[] = "views_export"
dependencies[] = "views_ui"

You can see the dependencies[] entry in many modules: it is used to list the modules that this module assumes to be installed and enabled, and figuring prominently in the list is, of course, the Features module itself. Thanks to it being installed, the rest of the info makes sense and can be understood by how we entered information onto the forms on the screens involved in the features export itself.

The module file itself has only a single line:

$ cat pft_lite/pft_lite.module
<?php

include_once('pft_lite.features.inc');

The file invoked by the module, pft_lite.features.inc, basically executes the installation of the specified components, including the default fields (which bundled together conform the content type), the node info, and the default view(s) we have included:

<?php

/**
* Implementation of hook_content_default_fields().
*/
function pft_lite_content_default_fields() {
module_load_include('inc', 'pft_lite', 'pft_lite.defaults');
return _pft_lite_content_default_fields();
}

/**
* Implementation of hook_node_info().
*/
function pft_lite_node_info() {
module_load_include('inc', 'pft_lite', 'pft_lite.defaults');
return _pft_lite_node_info();
}

/**
* Implementation of hook_views_default_views().
*/
function pft_lite_views_default_views() {
module_load_include('inc', 'pft_lite', 'pft_lite.defaults');
return _pft_lite_views_default_views();
}

As you can see, the details (the exportables, the user story content type, the list_user_stories view, etc.) are to be found in the remaining file, which we won't list here since it is included in the attached downloadable feature pft_lite-6.x-1.0-alpha1.tar_.gz  (rename ...tar_.gz to tar.gz).

So, that's what we we've got. Does it work?

Installing it and seeing if it works

In the next article in this series we will install the feature into an Open Atrium site and integrate: that will be exciting. Today, however, what we want to see is how an exported bare bones feature can then be imported into a vanilla Drupal installation (having the features module installed, of course, together with the other dependencies) and... just work.

What we need, actually, is our Features Machine as it was before we set up the PFT Lite functionality.

Fortunately, since we have been using Bazaar (bzr), it is simple to roll back the clock.

$ bzr log                                          
------------------------------------------------------------
revno: 2
committer: Victor Kane <victorkane@gmail.com>
branch nick: features
timestamp: Sun 2009-08-09 07:01:28 -0300
message:
PFT lite initial setup
------------------------------------------------------------
revno: 1
committer: Victor Kane <victorkane@gmail.com>
branch nick: features
timestamp: Sat 2009-08-08 16:59:33 -0300
message:
initial minimum install of features machine with context, features and other primary dependencies

We need to turn the clock back to Revision 1, refresh the database with our backed up SQL file corresponding to that snapshot, test that there is no trace of the PFT Lite functionality we had set up after that, install the feature as a module, and test.

Reverting to Revision 1 and seeing what we have

Wait, won't that be complicated? Not with bzr:

$ bzr revert -r 1
M sites/all/backup/db/features.sql
$

Go ahead and restore the database to its snapshot state with the features.sql file, and check that there is now no trace of PFT Lite functionality.

Caveat: since the database contains content field info, you actually want to zap the database completely before restoring, otherwise CCK might go a little crazy when you create user stories again. Do this (the drush status command will tell you what the database name is for the site) in order to empty the database and restore the saved sql file:

$ drush status
PHP configuration : /etc/php5/cli/php.ini
Drupal Root : /home/victorkane/Work/AWebFactory/projects/FeaturesMachine/features
Drupal version : 6.13
Site Path : sites/default
Site URI : http://default
Database Driver : mysqli
Database Hostname : localhost
Database Username : features
Database Name : features
Database Password : [erased here but drush will show it]
Database : Connected
Drupal Bootstrap : Successful
Drupal User : Anonymous
victorkane@victorkane:~/Work/AWebFactory/projects/FeaturesMachine/features$ drush sql cli
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2878
Server version: 5.0.75-0ubuntu10.2 (Ubuntu)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> drop database features;
Query OK, 57 rows affected (0.01 sec)

mysql> create database features;
Query OK, 1 row affected (0.00 sec)

mysql> use features;
Database changed
mysql> source sites/all/backup/db/features.sql
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
...
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye
$

By the way, normally you can restore that file with drush's invocation of the MySql command line, and pipe in the sql file, like this (ignore any pesky warning signs, don't mean a thing):

$ drush sql cli < sites/all/backup/db/features.sql

Then, go to the home page, and the Primary Menu item "WIP" is gone, along with everything else we did after we committed revision number 1 to bzr. No content items, no views, nothing up my sleeve.

Installing the feature

Install the pft_lite module to sites/all/modules just as you would any module, but to enable it you do NOT go to Administration > Site building > Modules, as usual, but rather to Administer > Site building > Features, where you will find it listed. Select the checkbox to enable the feature:

Enabling a feature we have installed ourselves

And click on the Save settings button.

Just for good measure, clear all caches (in the admin menu on the left hand side, mouse over the Drupal icon and click on flush all caches.

Testing

Lo and behold, our WIP primary menu item has miraculously appeared once more!

Our feature revealed once again!

Hellelulya sister and brother, you have installed your own feature! Nothing can stop us now.

Clicking on WIP lists nothing, of course, since we imported the site structure, not the content. However, clicking on Create content will offer the choice of creating some user stories, which you can do very quickly, and we are all set up with PFT Lite once again.

Caveat

Currently, taxonomy is not covered by the Features module since it does not in and of itself create an exportable. Since we are dealing here with two simple tag vocabularies which take just a few moments to set up, that is not a problem. Otherwise you can make use of one of the taxonomy export modules (for example see http://drupal.org/node/521630 in the Features module issue queue). Taxonomy and other elements will surely soon be covered by exportables and will therefore be able to be included in features in their own right.

Road map: expanding integration with Open Atrium

In the next article, we will import into our Open Atrium site and explore integration with those features, that will be pretty exciting (coming next week).

Bibliography

  1. Features module: http://drupal.org/project/features
  2. Context module: http://drupal.org/project/context
  3. Open Atrium site: http://openatrium.com/
  4. Making and using features (article): http://developmentseed.org/blog/2009/may/29/making-and-using-features-dr...
  5. Making and using features (video): http://vimeo.com/4902153
  6. Build a feature howto on Open Atrium site: http://openatrium.com/build_a_feature
  7. Lullabot podcast on this subject (make sure you listen to it AND read the comments): http://www.lullabot.com/audiocast/lullabot-podcast-75-drupal-distributio...
  8. Bazaar in five minutes: http://doc.bazaar-vcs.org/bzr.dev/en/mini-tutorial/index.html
  9. Bazaar User's Guide: http://doc.bazaar-vcs.org/bzr.dev/en/user-guide/index.html
  10. Drush module: http://drupal.org/project/drush
  11. Excellent guide to installing drush: http://nodeone.se/blogg/drupal/how-install-drush-drupal-shell

 

AttachmentSize
pft_lite-6.x-1.0-alpha1.tar_.gz2.67 KB

Project Flow & Tracker "Paris" - Part 3: Towards integration with Open Atrium via our very own branded Feature Server!

So today finally Project Flow & Tracker meets Open Atrium, and does so in style. My friends at Development Seed just told me about the new availability of the feature server code (w00t! out just a couple of days right here: http://code.developmentseed.org/featureserver/dashboard), not to mention a spanking new theme, singular,

"a minimal theme that can be rebranded quickly and simply using background images a la Twitter. The theme comes with several prepackaged backgrounds and site administrators are encouraged to upload their own."

also out just a couple of days, and which can be found at http://code.developmentseed.org/singular/dashboard . Singular and depends on the base theme Tao:  http://code.developmentseed.org/singular/dashboard (also fresh meat!).

So we will be diving right in. Here are the steps we will be taking, so hang on to your mice, it's going to be a fun ride:

Here we go...

First steps with Open Atrium itself (ok, what is it?):

Installing

In Part I of this series we describe installation of Open Atrium from the current tarball, which is definitely the most straightforward way of going. However... we are going to be developing Project Flow and Tracker on top of Open Atrium, so no matter how we plan on setting up our ultimate environment, we definitely want to check out the project from its home on github. That way we can update as new releases are tagged. At this point, I opted to initialize Project Flow & Tracker "Paris" with an "anonymous clone" from the Open Atrium Git repository.

First of all I needed to install Git on my Ubuntu dev box:

$ sudo apt-get update
$ sudo apt-get install git

Then, following the suggestions in the GitHub Guides (also for me, having used SVN for many years, the Git - SVN Crash Course on the Git site was particularly useful), I did the following to get Open Atrium's beta1 tag up and running in the subdirectory www:

$ git clone git://github.com/developmentseed/Atrium.git www
Initialized empty Git repository in /home/victorkane/Work/AWebFactory/projects/PFT/Paris/www/.git/
remote: Counting objects: 6695, done.
remote: Compressing objects: 100% (4748/4748), done.
remote: Total 6695 (delta 2033), reused 5504 (delta 1262)
Receiving objects: 100% (6695/6695), 7.42 MiB | 242 KiB/s, done.
Resolving deltas: 100% (2033/2033), done.
Checking out files: 100% (2855/2855), done.
$

From this point on, I created a virtual host and a database and installed following the same procedure as for the downloaded tarball, choosing the "Atrium by Development Seed" installation profile, choosing English (although there were Spanish and Arabic language alternative!!!), specifying Project Flow & Tracker as the site name, entering details and finally being congratulated upon having completed the installation:

Atrium installation complete

First login as admin

Clicking on the "your new site" link, or logging in for the first time as admin, ushers you into Atrium world, where you are urged to get started by creating a group:

Getting started with Open Atrium

Creating a group

I clicked on the Create group button and entered a Title (PFT dev), Description and Path value (pft-dev) for the group and indicated that it was a Private group

Creating an initial open atrium group and assigning it a path and access type

and clicked the Save button. I was taken to my group page:

New Open Atrium group

Now, Project Flow & Tracker needs more than just the Blog, Documents and Dashboard icons. So I clicked on the Settings button, which by default allowed me to edit the group title, description, path value and access type (private or public), and then clicked on the Features tab. I just knew it was going to let me enable and disable group action icons! Not only that, but also whether the default page for the group's space (associated with its path value) should be the dashboard, the documents (hierarchical books) or any of the enabled features! Plus the possibility of uploading a group logo and changing the color of the group page:

Customizing the Open Atrium group space

So I enabled all the features (which would be needed by Project Flow & Tracker). Here's what the PFT dev section looks like customized with my favorite #cc0000 red and with a couple of bells and whistles (all of which I set to private, even though some can be public, like you can have public docs and private case tracker, etc.), and I got my twit shout on:

Starting to customize the dev group in Open Atrium

But what about adding members, where do I have to go for that. Well, then I was in for a really sweet surprise! Didn't have to go anywhere, the Members button was right there next to the Settings button; and not only that, but you can invite people to your group who aren't even registered on the site! So the first thing I did was to invite myself: I clicked on the Members button, and then on the Add new account tab. I filled in the details, noticing that the new user would be automatically added to the PFT group!

Add new account to existing Open Atrium group

After hitting the Add button, a nifty pop up and dismissable status box appears telling you what's up, really smooth way of theming Drupal status, warning and error messges:

Open Atrium Status boxes

I'm really excited because a lot of people have used Project Flow & Tracker and I just know with Open Atrium I'm going to be able to build a really sweet user interface with a lot of the usability problems solved, some out of the box, like with this group invite: and each group can have several projects, very cool. And I just realized that the whole shebang is Project Flow & Tracker, and that the features will not be PFT itself, but rather different methodological approaches: I can have a generic agile feature and then disable case tracker, I can have a Scrum plugin, and a WIP Kanban plugin, or Scrum and Kanban, things are already starting to take shape as I prototype!

So I am going to do my first login as victorkane the manager here, and take charge, invite a couple more people, get the project and the project docs going...

Creating a project and some project docs

So victorkane logs in for the first time after receiving the mail in the usual Drupal way, and is taken to his own dashboard (which will show all personal activity on the site). And clicking on the My groups button, the options pop down from above with a handy button to easily get to each section (at this point just the PFT dev group is listed):

Invited group manager logs into Open Atrium for the first time

Or you can just click on the Groups icon for a more detailed listing of your groups. Clicking on the Members icon gives this manager user administration functionality (user directory, Drupal all users, the ability to manage users roles and email and to add users to the site) and the Home icon takes you back to the activity dashboard. Very sweet. I'm not going to go into all the nifty Open Atrium details, you are going to want to download it and play with it yourself (for example, the ability to customize your own profile layout: what is this, MySpace?).

So getting down to business I click on the PFT dev group link, and get to my Dashboard view (for that is the default starting page for the group).

Initial Open Atrium group manager dashboard

So I won't bore you with the details, I clicked on the Case Tracker icon, created a Project and a couple of cases, clicked on the Documents icon and wrote up some docs, just to get things moving. In creating the project I did notice some nice usability touches though; notice below the more inobtrusive format type drop down box and popup Formatting help, and above all the notification options:

Creating a project in Open Atrium

And there was similiar functionality with the cases I added to the project, and in creating a group document. In regard to the PFT Architecture Document I wanted to start, one thing I am going to have to do is associate somehow group documents with a specific Project, so each project can have its own docs. For the present I stuck in a keyword tag which'll do me for now. Another thing I will need to do is integrate user story tasks with the calendar, and maybe get some additional calendar views (Gantt?)... OK, all in good time. Anyway, dashboard is starting to get populated:

Open Atrium Group Dashboard

Inviting some more team members

I needed to get our designer Laura Graph on board, as well as Fred Testy, our all around dev make it happen guy here at AWebFactory. So as a manager I intuitively clicked on Members... but could only see Faces and List. Yeah, I should be able to add members right here. I'm the manager, aren't I? Yeah, I guess a user invited to a Group as manager should automatically be given _group_ manager standing also (actually, I visited GitHub and posted a feature request on this one :) ). The saving factor, though, was that I was able to get Laura and Fred on board by clicking on Home, then clicking on the Members Icon and a form opened up on the right for managing users (automatically added to PFT dev since that is my only group).

Working together

Everyone logged in and started kicking up a storm. We leave them to their own devices now and explore the exciting new... feature server!

Our bare bones "Feature Machine" morphs into the stylishly themed and branded AWebFactory Feature Server!

In the last part of this series of articles, we had our bare-bones "feature machine" going, which enabled us to create a feature and export it to a packaged tarball even though it was nothing more than off-the-shelf Drupal plus basically the cck, views, features, diff and context modules. Now we want more: we want our very own feature server just by adding it in as a feature! And now the code is out!

Feature Server

Plan A is to load up the feature server as a feature in our bare-bones Drupal based feature machine. If that doesn't work, we'll do another install of Open Atrium and stick it there (that's Plan B).

So the Dev Seed code page lists the following dependencies:

  • CCK
  • Context
  • Features
  • Filefield
  • Views

OK, so all we are missing is Filefield, apparently. Let's get that in:

$ drush dl filefield
Project filefield (6.x-3.1) downloaded to [success]
/home/victorkane/Work/AWebFactory/projects/FeaturesMachine/features/sites/all/modules/.
$ drush enable filefield
The following modules will be enabled: filefield
Do you really want to continue? (y/n): y
FileField was enabled successfully. [ok]
$

The thing is, I need to reorganize my directories a la Open Atrium, and I am using bzr here for the Feature Machine, or Feature Server now, so some "mkdir", "bzr add" and "bzr mv" later we got the following directory tree for ./sites/all/module:

$ tree -L 2
.
|-- contrib
| |-- admin_menu
| |-- cck
| |-- context
| |-- diff
| |-- features
| |-- filefield
| `-- views
`-- features
`-- pft_lite

After clearing the cache and making sure Drupal could feel all its arms and legs, I unpacked the downloaded Feature Server package into ./sites/all/modules/features/ and went to Administer > Site building > Features and saw the feature server feature listed as a feature:

Development Seed feature server listed as a feature

So I selected the Feature Server feature checkbox and clicked on Save Settings. After a very short trundle, it looked like it was installed. I clicked on the View action link and got the inside dope:

Dev seed Feature server details

So, there are two content types (project and release), some views, and there's a menu path: ./fserver. Hitting it I am told, of course, that I have no projects :)

We stick our feature onto our Feature Server

So I go to Create content > Project ( ./node/add/fserver-project) to create the Project Flow & Tracker project:

Creating a dev seed feature server project

After saving the project, I was told how this feature server could be enabled for updates for this project:

A dev seed feature server project has been created

So shortly you will be able to update the feature from a server (right now, as you can see from the url, for the time being the feature server is on my intranet dev box).

Now I can create the first release for the project, enabling me to upload the tarball we exported as a feature last time! I go to Create content > Release:

Create release for dev seed feature server project

Hitting save:

Release created

Now the project is populated:

A project with its first release on a dev seed feature server

So we sure have a convenient place to hang features which can be downloaded, untarred and enabled on anyone's site complying with the dependencies.

Time to commit our work to bzr!

$ drush cache clear
Cache cleared.
$ drush sql dump > sites/all/backup/db/features.sql
$ bzr add
adding .directory
adding sites/default/files/fserver
adding sites/all/modules/features/fserver
adding sites/default/files/fserver/pft_lite-6.x-1.0-alpha1.tar_.gz
adding sites/all/modules/features/fserver/fserver.css
adding sites/all/modules/features/fserver/fserver.defaults.inc
....
adding sites/all/modules/features/fserver/views/fserver_plugin_style_updatexml.inc
adding sites/all/modules/features/fserver/views/theme.inc
$ bzr commit -m "Feature machine is now feature server hosting pft-lite feature"
...
Committed revision 3
$ bzr log
------------------------------------------------------------
revno: 3
committer: Victor Kane <victorkane@gmail.com>
branch nick: features
timestamp: Sat 2009-08-15 13:31:42 -0300
message:
Feature machine is now feature server hosting pft-lite feature
------------------------------------------------------------
revno: 2
committer: Victor Kane <victorkane@gmail.com>
branch nick: features
timestamp: Sun 2009-08-09 07:01:28 -0300
message:
PFT lite initial setup
------------------------------------------------------------
revno: 1
committer: Victor Kane <victorkane@gmail.com>
branch nick: features
timestamp: Sat 2009-08-08 16:59:33 -0300
message:
initial minimum install of features machine with context, features and other primary dependencies

You've come a long way, baby!


Theming

So the Feature Machine is now a fully fledged Feature Server! Does look a bit stark though. Here's where the Singular theme we were talking about earlier comes in! On the Singular project page it says Singular requires the Tao theme "to function properly".  OK, I can do that. I download and unpack both in a ./sites/all/themes directory. Added to bzr for good measure.

The singular.info file shows that it is indeed a Tao sub-theme:

; $Id$
name = "Singular"
description = "Simple theme based on tao."
version = "6.x-1.2"
core = "6.x"
engine = "phptemplate"
base theme = "tao"

So it will benefit from the Tao browser reset and other improvements (see project page).

I go to Administer > Site configuration > Administration theme and make Garland the administration theme, as I always do before dealing with the unkown. Then to Administer > Site building > Themes and enable Tao and Singular, and set Singular as the default theme.

Swimmingly!

Development Seed Singular theme off-the-shelf

Very nice. So what can you configure? Administer > Site building > Themes > Singular > Configure.

Wow! Among other options, right there in configuration you can choose between fixed and fluid widths, and between the various styles (Book, City, Clouds, Rocks, Sea (default above) and... Custom!

Branding

After experimenting with the bundled styles (very nice, transparencies, the height of twittitude!)  I clicked on Custom, which is where the real fun begins:

Dev Seed Singular theme configuration page

A very nice detail of course is the use of the farbtastic color wheel to choose the background color. It appears when you click on the Background color textfield.

So I just took the image I use for my twitter account (http://twitter.com/victorkane) and cropped the right hand side off so it was 950 wide (the bundled background images are all of different sizes, but around 600 px in height; of course it can be tiled) (should have been a bit wider, but hey...). And uploaded it in the above theme configuration page leaving a white background color. After branding the site name also, after just a few minutes we have the AWebFactory Feature Machine feature server:

Branded Features Server

OK, this has been a real picture book post today, but I really wanted to share this.

Roadmap

In the next part of this series, we will be moving forward and try out various ways of integrating Project Flow and Tracker with Open Atrium, and from that point on PFT and/or its attendant plugins (Scrum, Kanban, what have you) will be available on our feature server all through developoment and beyond, and once a beta version is reached we will publish on http://drupal.org as an install profile. We will be doing the following:

  • Importing Project Flow & Tracker as a feature into our Open Atrium based PFT site
  • First steps for integration of PFT feature into Open Atrium
  • Bringing back the full PFT feature set
  • Making PFT usable
  • Using PFT to develop PFT
  • Development environment