xpshowdevelopertasks: error in "Developer totals" when concatenate 2 developers
I'm trying something like this ...
%XPSHOWDEVELOPERTASKS{DeveloperName1}%
%XPSHOWDEVELOPERTASKS{DeveloperName2}%
But when i do it, i get "Developer totals" for second developer as (sum of all tasks for developer 2)
and (sum of "developer totals" for developer 1).
This issue matters because the variables
$totalSpent,$totalEtc,$totalEst
within
developerTasKByProject
function are the same ones that variables
$totalSpent,$totalEtc,$totalEst
in
developerTask
function.
In order to solve this issue, i changed vars within
developerTaskByProject
in local vars and make all changes neccesary to get two functions work.
I have solved this issue applying next patch to code (maybe this patch would be commited by some xptrackerplugin developer to svn):
Index: lib/TWiki/Plugins/XpTrackerPlugin/Show.pm
===================================================================
--- lib/TWiki/Plugins/XpTrackerPlugin/Show.pm (revisión: 17443)
+++ lib/TWiki/Plugins/XpTrackerPlugin/Show.pm (copia de trabajo)
@@ -62,9 +62,13 @@
# todo: build a list of projects/iterations sorted by date
my ($totalSpent,$totalEtc,$totalEst)= (0,0,0);
foreach my $project (@projects) {
- my $text;
- ($text,$totalSpent,$totalEtc,$totalEst) = &developerTasksByProject($developer,$project,$web);
+ my $text, $projectSpent, $projectEtc, $projectEst;
+ ($text,$projectSpent,$projectEtc,$projectEst) = &developerTasksByProject($developer,$project,$web);
+ $totalSpent += $projectSpent;
+ $totalEtc += $projectEtc;
+ $totalEst += $projectEst;
+
if (($totalEtc && $totalEtc>0) || ($totalSpent && $totalSpent>0)) {
$list .= "\n\n\n";
$list .= "---+++ Project: " . $web.".".$project ."\n\n";
@@ -104,6 +108,8 @@
TWiki::Plugins::XpTrackerPlugin::Cache::initCache($web);
+ my ($totalSpent,$totalEtc,$totalEst)= (0,0,0);
+
my $list="";
my @teams = &TWiki::Plugins::XpTrackerPlugin::xpGetProjectTeams($project, $web);
foreach my $team (@teams){
--
AndresManeiro - 24 Aug 2008