aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/App/Controller/Admin.pm11
-rw-r--r--templates/web/default/admin/index.html2
2 files changed, 9 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm
index 3282ae831..8e4f4b5de 100644
--- a/perllib/FixMyStreet/App/Controller/Admin.pm
+++ b/perllib/FixMyStreet/App/Controller/Admin.pm
@@ -171,11 +171,16 @@ sub questionnaire : Path('questionnaire') : Args(0) {
$c->forward('check_page_allowed');
my $questionnaires = $c->model('DB::Questionnaire')->search(
- { whenanswered => \'is not null' }, { group_by => [ 'ever_reported' ], select => [ 'ever_reported', { count => 'me.id' } ], as => [qw/reported questionnaire_count/] }
+ { whenanswered => { '!=', undef } },
+ { group_by => [ 'ever_reported' ],
+ select => [ 'ever_reported', { count => 'me.id' } ],
+ as => [ qw/reported questionnaire_count/ ] }
);
-
- my %questionnaire_counts = map { ( $_->get_column( 'reported' ) || -1 ) => $_->get_column( 'questionnaire_count' ) } $questionnaires->all;
+ my %questionnaire_counts = map {
+ ( defined $_->get_column( 'reported' ) ? $_->get_column( 'reported' ) : -1 )
+ => $_->get_column( 'questionnaire_count' )
+ } $questionnaires->all;
$questionnaire_counts{1} ||= 0;
$questionnaire_counts{0} ||= 0;
$questionnaire_counts{total} = $questionnaire_counts{0} + $questionnaire_counts{1};
diff --git a/templates/web/default/admin/index.html b/templates/web/default/admin/index.html
index d1ed09114..b1eddaa3a 100644
--- a/templates/web/default/admin/index.html
+++ b/templates/web/default/admin/index.html
@@ -21,7 +21,7 @@
[% IF c.cobrand.admin_show_creation_graph -%]
<p>
- <a href="">[% loc('Graph of problem creation by status over time') %]</a>
+ <a href="[% c.config.BASE_URL %]/bci-live-creation.png">[% loc('Graph of problem creation by status over time') %]</a>
</p>
[% END -%]