diff options
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Reports.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Reports.pm | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm index 93af3393c..0587a627a 100644 --- a/perllib/FixMyStreet/App/Controller/Reports.pm +++ b/perllib/FixMyStreet/App/Controller/Reports.pm @@ -110,6 +110,8 @@ sub ward : Path : Args(2) { $c->stash->{council_url} = '/reports/' . $council_short; + $c->stash->{stats} = $c->cobrand->get_report_stats(); + my $pins = $c->stash->{pins}; $c->stash->{page} = 'reports'; # So the map knows to make clickable pins @@ -338,7 +340,7 @@ sub load_and_group_problems : Private { $where, { columns => [ - 'id', 'council', 'state', 'areas', 'latitude', 'longitude', 'title', + 'id', 'council', 'state', 'areas', 'latitude', 'longitude', 'title', 'cobrand', { duration => { extract => "epoch from current_timestamp-lastupdate" } }, { age => { extract => "epoch from current_timestamp-confirmed" } }, ], @@ -351,9 +353,10 @@ sub load_and_group_problems : Private { my ( %fixed, %open, @pins ); my $re_councils = join('|', keys %{$c->stash->{areas_info}}); - my @cols = ( 'id', 'council', 'state', 'areas', 'latitude', 'longitude', 'title', 'duration', 'age' ); + my @cols = ( 'id', 'council', 'state', 'areas', 'latitude', 'longitude', 'title', 'cobrand', 'duration', 'age' ); while ( my @problem = $problems->next ) { my %problem = zip @cols, @problem; + $c->log->debug( $problem{'cobrand'} . ', cobrand is ' . $c->cobrand->moniker ); if ( !$problem{council} ) { # Problem was not sent to any council, add to possible councils $problem{councils} = 0; @@ -372,10 +375,10 @@ sub load_and_group_problems : Private { } } - $c->stash( - fixed => \%fixed, - open => \%open, - pins => \@pins, + $c->stash( + fixed => \%fixed, + open => \%open, + pins => \@pins, ); return 1; |