--- XpTrackerPlugin.pm.3.1.beta 2002-12-31 14:18:05.000000000 -0800 +++ XpTrackerPlugin.pm 2003-01-01 07:27:44.000000000 -0800 @@ -734,8 +734,17 @@ my @teamIters = &xpGetTeamIterations($team, $web); - # write out all iterations to table + # Get date of each iteration + my %iterKeys = (); foreach my $iter (@teamIters) { + my $iterText = &TWiki::Store::readTopic($web, $iter); + my $iterDate = &xpGetValue("\\*Start\\*", $iterText, "START"); + my $iterSec = HTTP::Date::str2time( $iterDate ) - time; + $iterKeys{$iter} = $iterSec; + } + + # write out all iterations to table + foreach my $iter (sort { $iterKeys{$a} <=> $iterKeys{$b} } @teamIters) { # get additional information from iteration my $iterText = &TWiki::Store::readTopic($web, $iter); @@ -767,8 +776,17 @@ my @teamIters = &xpGetTeamIterations($team, $web); - # write out all iterations to table + # Get date of each iteration + my %iterKeys = (); foreach my $iter (@teamIters) { + my $iterText = &TWiki::Store::readTopic($web, $iter); + my $iterDate = &xpGetValue("\\*Start\\*", $iterText, "START"); + my $iterSec = HTTP::Date::str2time( $iterDate ) - time; + $iterKeys{$iter} = $iterSec; + } + + # write out all iterations to table + foreach my $iter (sort { $iterKeys{$a} <=> $iterKeys{$b} } @teamIters) { # get additional information from iteration my $iterText = &TWiki::Store::readTopic($web, $iter); @@ -856,8 +874,17 @@ $list .= "| *Iter* | *Summary* | *Start* | *End* | *Est* | *Spent* | *ToDo* | *Progress* | *Done* | *Overrun* |\n"; - # write out all iterations to table + # Get date of each iteration + my %iterKeys = (); foreach my $iter (@teamIters) { + my $iterText = &TWiki::Store::readTopic($web, $iter); + my $iterDate = &xpGetValue("\\*Start\\*", $iterText, "START"); + my $iterSec = HTTP::Date::str2time( $iterDate ) - time; + $iterKeys{$iter} = $iterSec; + } + + # write out all iterations to table + foreach my $iter (sort { $iterKeys{$a} <=> $iterKeys{$b} } @teamIters) { # get additional information from iteration my $iterText = &TWiki::Store::readTopic($web, $iter); @@ -963,7 +990,7 @@ sub xpGetProjectTeams { my ($project, $web) = @_; - return split( /\s+/, $cachedProjectTeams{$project} ); + return defined($cachedProjectTeams{$project}) ? split( /\s+/, $cachedProjectTeams{$project} ) : (); } ########################### @@ -1032,8 +1059,9 @@ my %iterKeys = (); foreach my $iteration (keys %master) { my $iterText = &TWiki::Store::readTopic($web, $iteration); - $iterText =~ /\