]> git.etc.gen.nz Git - planner-tools.git/commitdiff
Export the duration for tasks.
authorAndrew Ruthven <andrew@etc.gen.nz>
Sat, 21 Feb 2009 07:24:02 +0000 (20:24 +1300)
committerAndrew Ruthven <andrew@etc.gen.nz>
Sat, 21 Feb 2009 07:24:02 +0000 (20:24 +1300)
planner2csv.pl

index ed3c5c3ba2c2baf6b77236e319ddacc85842772d..ba9bdf0f72579a7d5b63d5351772be368192f186 100755 (executable)
@@ -25,7 +25,7 @@ my $root = $tree->getDocumentElement;
 
 my $csv = Text::CSV_XS->new(); 
 
-print 'id,description,allocated,start,end,"percent complete"' . "\n";
+print 'id,description,allocated,start,end,"duration (s)","percent complete"' . "\n";
 
 for my $tasks ($root->findnodes('/project/tasks')) {
   find_tasks($tasks);
@@ -49,6 +49,7 @@ sub find_tasks {
     push @fields, 
         date_convert($task->findvalue('@start')),
         date_convert($task->findvalue('@end')),
+        $task->findvalue('@work'),
         $task->findvalue('@percent-complete');
 
     $csv->combine (@fields);