On this page
- Architecture of Work Tracker
- Tutorial: Add a "Due date" field to Tasks
- Step 1: Add the field to the Task
- Step 2: Position the field on all displays
- Step 3: Add a column to the "Task list" view
- Step 4: Update the "Tasks Section" panelizer default
- Step 5: Create a Features module with your extension
- Step 6: (Optional) Add some CSS to make it look pretty
Extending Work Tracker
This guide will explain how to extend Open Atrium Work Tracker.
Architecture of Work Tracker
Because every organization has different needs when it comes to tracking work, making it possible to easily extend Work Tracker was a very high priority in it's design!
Work Tracker is a Feature implemented using standard components like Fields, Views, Panels, and Comment Alter, with as little custom code as possible.
This means you can easily extend it, almost entirely in the user interface, and export those changes using Features Override into your own extension module.
IMPORTANT NOTE: If you don't put your changes into an extension module, you risk losing your customizations when new versions of Work Tracker come out!
Tutorial: Add a "Due date" field to Tasks
One of the most common extensions is adding a new field to Tasks, that you want to be updated via posting a comment and displayed in the "Task List".
Work Tracker (since version 1.0-beta1) includes an extension module for adding a Due Date, which you can refer to as a complete example.
In this short tutorial, we're going to walk through all the steps necessary to create a "Due date" extension module.
NOTE: the resulting module won't work exactly the same as the one included in Work Tracker, however, the steps described here will help you get started on your own extension!
Step 1: Add the field to the Task
- Go to: "Admin" -> "Structure" -> "Content types"
- Click the "manage fields" link next to "Task"
- Under "Add new field" set the label to "Due date" and select "Date" for the field type and "Popup calendar" for the widget type - click "Save"
- Check the "Enable altering this field from comments" - this is from Comment Alter, which is what allows you to update the field via a comment:

- Expand the "Default values" fieldset and change the "Default date" to "No default value"
- Click "Save settings"
Step 2: Position the field on all displays
You'll need to put the field in the correct place on the node form, comment form and node view. There is a "Task information" fieldset on each of those that the field should appear under.
- Node form:
/admin/structure/types/manage/oa-worktracker-task/fields - Comment form:
admin/structure/types/manage/oa-worktracker-task/comment/fields - Node view:
/admin/structure/types/manage/oa-worktracker-task/display(be sure to change the "Label" to "Inline", like the other fields)
Don't forget to save after moving the field into the correct place!
Step 3: Add a column to the "Task list" view
- Go to: "Admin" -> "Structure" -> "Views"
- Find the "Open Atrium Work Tracker" view and click "Edit"
- Click the "Task list" display (if you're not already on it)
- In the "Fields" section click "Add"
- Select the "Content: Due date" field and click "Apply"
- Leave the defaults and click "Apply" again
- Save the view
Step 4: Update the "Tasks Section" panelizer default
The "Due date" column now exists on the "Task list" view - however, by default it won't be shown on any "Tasks Section". To change this:
- Go to: "Admin" -> "Structure" -> "Content types"
- Click the "panelizer" link next to "Section Page"
- Click "Full page override"
- Click the dropdown arrow and select "Content" in the row for "Tasks Section"
- Click the gear icon in the "Task list" pane and select "Settings"
- Under "Field settings", make sure that "Display Content: Due date" is selected and click "Save"
Step 5: Create a Features module with your extension
- Go to: "Admin" -> "Structure" -> "Features"
- Click the "Create feature" tab
- Fill in the "Name", "Description" and "Package" with whatever you like!
- Under "Field bases" select "field_oa_worktracker_duedate"
- Under "Field instances" select "node-oa_worktracker_task-field_oa_worktracker_duedate"
- Under "Field overrides" select the following:
- field_group group_oa_worktracker_task_info|comment|comment_node_oa_worktracker_task|form
- field_group group_oa_worktracker_task_info|node|oa_worktracker_task|default
- views_view oa_worktracker
- panelizer_defaults node:oa_section:oa_section_worktracker
- Click "Download feature" and save your module to your computer
- Upload the module to your server, extract in
sites/all/modulesand enabled it!
Now, your customizations are in a custom extension module. If you disable the module, your changes will go away and everything will be restored to default. Also, if a new version of Work Tracker comes out, your customizations won't get overwritten!
If you think your extension module might be useful to others, please consider contributing it back to Work Tracker by creating an issue in the issue queue:
https://drupal.org/node/add/project-issue/oa_worktracker
Step 6: (Optional) Add some CSS to make it look pretty
Here is what the comment form looks like after following steps 1-5 above:

Not pretty, eh? :-)
In your module's .info file, you can add a CSS file, for example:
stylesheets[all][] = oa_worktracker_duedate.css
Then create the 'oa_worktracker_duedate.css' file and use your CSS skills to make it look better! This is beyond the scope of this guide, but you can look at one included in the Due Date extension for an example.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion