{assign var=TotalData value=0} {assign var=TotalWData value=0}
{if $weight_field==""} {else} {/if}


{if $weight_field==""} {else} {/if} {foreach name=outer key=key item=item from=$stats} {math equation="(x + y)" x=$item.data y=$TotalData assign=TotalData} {if $weight_field==""} {else} {/foreach} {if $weight_field==""} {else} {/if}
{$field}{$STRING.INDEX.NumberOfBugs} {$STRING.weighted}
{$weight_field}
{$item.label} {$item.data|default:0}{$item.w_data|default:0} {math equation="(x + y)" x=$item.w_data y=$TotalWData assign=TotalWData} {/if}
{$STRING.totalbugs} {$TotalData} {$TotalWData}