The project_usage_process_weekly() function called by the cron job expects that the array of timestamps returned by project_usage_get_weeks_since() will begin with an index of 0. But instead it is returning an array with an initial index of 0 due to a misunderstanding on my part. I thought that $foo[$i] = $i++ would give array(0 => 0); rather than array(1 => 0);. As a result the first week in the week's worth of stats wasn't being computed correctly.

CommentFileSizeAuthor
usage_usage_wrong_offset.patch744 bytesdrewish

Comments

drewish’s picture

Priority: Normal » Critical

I really would like to get this committed and on d.o before we try to run the weekly stats for the first time.

dww’s picture

Status: Reviewed & tested by the community » Fixed

Looked reasonable, and you say it's RTBC, so I committed to HEAD and installed on d.o.

Anonymous’s picture

Status: Fixed » Closed (fixed)