Index: includes/workflow.views.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/workflow/includes/workflow.views.inc,v
retrieving revision 1.2
diff -u -r1.2 workflow.views.inc
--- includes/workflow.views.inc	24 Sep 2009 23:02:50 -0000	1.2
+++ includes/workflow.views.inc	19 Nov 2009 02:17:28 -0000
@@ -185,6 +185,49 @@
     ),
   );
 
+  $data['workflow_node_current']['table']['group']  = t('Workflow');
+  // Explain how this table joins to others.
+  $data['workflow_node_current']['table']['join'] = array(
+    'node' => array(
+      'table' => 'workflow_node_history',
+      'field' => 'nid',
+      'left_table' => 'node',
+      'left_field' => 'nid',
+      'extra' => 'workflow_node_current.stamp = (SELECT max(stamp) from {workflow_node_history} where nid = node.nid)',
+    ),
+  );
+
+  // time
+  $data['workflow_node_current']['stamp'] = array(
+    'title' => t('Current time'), // appears in views ui.
+    'help' => t('the time at which the node moved from the last state to the current state.'),
+    'field' => array(
+      'handler' => 'views_handler_field_date',
+      'click sortable' => true,
+     ),
+    'filter' => array(
+      'handler' => 'views_handler_filter_date',
+      'numeric' => true,
+    ),
+    'sort' => array(
+      'handler' => 'views_handler_sort_date',
+    ),
+  );
+
+  // comment
+  $data['workflow_node_current']['comment'] = array(
+    'title' => t('Current comment'), // Appears in views UI.
+    'help' => t('The comment describing why the node was moved from the last state to the current state.'),
+    'field' => array(
+      'handler' => 'views_handler_field_xss',
+      'click sortable' => TRUE,
+     ),
+    'filter' => array(
+      'handler' => 'views_handler_filter_string',
+      'numeric' => TRUE,
+    ),
+  );
+
   return $data;
 }
 
