diff --git a/share/html/Search/Elements/Chart b/share/html/Search/Elements/Chart index 850a000d36..5475677e76 100644 --- a/share/html/Search/Elements/Chart +++ b/share/html/Search/Elements/Chart @@ -84,7 +84,11 @@ RT::Interface::Web::Session::Set(
% if ( ($ChartStyle || '') =~ /\b(pie|bar|line)\b/ ) {
+% if ( !$r->isa('RT::Dashboard::FakeRequest') || RT->Config->Get('EmailDashboardIncludeCharts') ) { <& /Search/JSChart, Cache => $key, %ARGS, GroupBy => \@GroupBy &> +% } else { + <&|/l&>Chart is not available in emails, click title to get the live version. +% }
% }
diff --git a/t/mail/dashboard-chart-with-utf8.t b/t/mail/dashboard-chart-with-utf8.t index 29553b2e36..bf7faecf23 100644 --- a/t/mail/dashboard-chart-with-utf8.t +++ b/t/mail/dashboard-chart-with-utf8.t @@ -96,4 +96,6 @@ like( 'mail subject' ); +like( $mail->bodyhandle->as_string, qr/Chart is not available in emails, click title to get the live version/, 'chart hint' ); + done_testing;