Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#115 Invalid columns in metrics download

open
nobody
None
5
2010-07-16
2010-07-16
elmugrat
No

The data below the "Comment Threads" and "Submitted Comments" headers in the downloaded metrics.csv is invalid (all zeros). The correct data is shifted 2 columns to the right, thus offsetting all of the other columns by 2 as well. The problem is in lib/Codestriker/Model/MetricStats.pm, around line 300 in the get_raw_metric_data function. The foreach my $metric (@{$headers->{comment}}) {} loop will attempt to fill both of the problematic columns, but will be unable to find them in the database so it just fills in zeroes. The correct data is obtained immediately after the foreach using seperate database queries. Skipping those two fields in the foreach solves the problem.

Discussion