• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item5956: xpshowdevelopertasks: error in "Developer totals" when concatenate 2 developers

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension XpTrackerPlugin Normal Confirmed   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

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

ItemTemplate
Summary xpshowdevelopertasks: error in "Developer totals" when concatenate 2 developers
ReportedBy TWiki:Main.AndresManeiro
Codebase ~twiki4
SVN Range TWiki-5.0.0, Mon, 18 Aug 2008, build 17431
AppliesTo Extension
Component XpTrackerPlugin
Priority Normal
CurrentState Confirmed
WaitingFor

Checkins

TargetRelease n/a
ReleasedIn

Topic revision: r1 - 2008-08-25 - RafaelAlvarez
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback