Make total time spent on an issue available to views. Is that possible?

CommentFileSizeAuthor
#1 bubbletimer_field_stat.tar_.gz361 bytesitarato

Comments

itarato’s picture

StatusFileSize
new361 bytes

Hi,

Yes, it is possible. Although it is not obvious yet, it's my bad, I know. Steps:
1: Download the dev release (it's stable): http://ftp.drupal.org/files/projects/bubbletimer-6.x-2.x-dev.tar.gz
2: Download and enable Computed Field module: http://drupal.org/project/computed_field
3: Add computed field to the observed node types with this config:
[Computed code]:

module_load_include('inc', 'bubbletimer', 'bubbletimer.api');
$node_field[0]['value'] = bubbletimer_get_node_total($node->nid);

[Data type]: float
4: By default, computed fields are updated when node is updated. So, you need a tiny module that implements hook_bubbletimer($op, $params). Sample (working) module is attached below.
5: Create a view and add the appropriate field to it.

It's kinda alpha-ish solution, I'm still thinking of a better one. But if you need you can do it as I wrote.

Regards,
Peter

attiks’s picture

Problem with this solution is that you cannot report per node and per user since the only field available is the total off all users.