require "timelocal.pl"; @fieldnames=("Assigned To", 'Bug#', "CRname", "CRtime", "Component", "OS/Version", "Platform", "Priority", "Product", "QA Contact", "Reported By", "Resolution", "Severity", "Status", "Summary", "Target milestone", "URL", "Version"); $off=1; foreach $i (@fieldnames){ $n2off{$i}=$off++; } open(A, "gunzip < details.gz|"); while (){ chop(); @x=split(/\;/); $product{$x[$n2off{"Bug#"}]}{$x[$n2off{"Product"}]}++; $comp{$x[$n2off{"Bug#"}]}{$x[$n2off{"Component"}]}++; $pri{$x[$n2off{"Bug#"}]}=$x[$n2off{"Priority"}]; } while(){ chop(); ($mr, $stmp1, $ndelta, $nadd, $ndel, $i, $bugs, $isBug, $isClient, $mm, $ff,$ii)=split(/\;/); if ($mrs{$mr}>0){next;} @Bugs=split(/\:/,$bugs); foreach $bug (@Bugs){ $isChange{$bug}++; $mm1="NotClient"; if ($isClient){ $mm1="IsClient";} $mods1{$bug}{$mm1}++; foreach $mod (split(/ /,$mm)){ $mods{$bug}{$mod}++; } } } open(A, "gunzip < crdate.gz|"); while (){ chop(); ($line,$bug,$stmp)=split(/\;/); $crdate{$bug}=$stmp; $dts{$bug}{$stmp} } open(A, "gunzip ){ chop(); ($line,$nentries,@entries)=split(/\;/); undef %dates; undef %dates1; undef %stats; foreach $entry (@entries){ ($key,$val)=split (/\=/, $entry); if ($key eq "Bug"){ $bug=$val; } if ($key =~ /^(\d+):4$/){ $row=$1; if($val=~/(\d\d\d\d)\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)/){ $y=$1;$m=$2;$d=$3;$hr=$4; $minu=$5; $sec=$6; $stmp = &timelocal (($sec,$minu,$hr,$d,$m-1,$y-1900)); } $dates1{$row}=$stmp; $dates{$stmp}++; } if ($key =~ /^(\d+):3$/){ $row=$1; $stats{$row}=$val; } } if ($bug ne ""){ foreach $d (keys %dates){ $dts{$bug}{$d}++; } foreach $d (keys %stats){ if($stats{$d} eq "FIXED"){ $dtsf{$bug}=$dates1{$d};} if($stats{$d} eq "RESOLVED"){ $dtsr{$bug}=$dates1{$d};} if($stats{$d} eq "VERIFIED"){ $dtsv{$bug}=$dates1{$d};} } } } foreach $bug (keys %dts){ @dates=sort (keys %{ $dts{$bug} }); $s=1; if ($#dates < $s) { $s=0;} $isChange{$bug}+=0; @M=keys %{ $mods{$bug} }; @M1=keys %{ $mods1{$bug} }; @P=keys %{ $product{$bug} }; @C=keys %{ $comp{$bug} }; print "$bug\;$pri{$bug}\;$crdate{$bug}\;$#dates\;$dates[0]\;$dates[$s]\;$dates[$#dates]\;$#M\;$#P\;$#C\;@M\;@P\;@C\;@M1\;$dtsf{$bug}\;$dtsr{$bug}\;$dtsv{$bug}\;$isChange{$bug}\n"; }