summaryrefslogtreecommitdiff
path: root/rt/share/html/Search/Chart
diff options
context:
space:
mode:
Diffstat (limited to 'rt/share/html/Search/Chart')
-rw-r--r--rt/share/html/Search/Chart3
1 files changed, 2 insertions, 1 deletions
diff --git a/rt/share/html/Search/Chart b/rt/share/html/Search/Chart
index 429fea52f..7bcb8d0d9 100644
--- a/rt/share/html/Search/Chart
+++ b/rt/share/html/Search/Chart
@@ -66,7 +66,8 @@ if ($ChartStyle eq 'pie') {
use RT::Report::Tickets;
my $tix = RT::Report::Tickets->new( $session{'CurrentUser'} );
-
+my %AllowedGroupings = reverse $tix->Groupings( Query => $Query );
+$PrimaryGroupBy = 'Queue' unless exists $AllowedGroupings{$PrimaryGroupBy};
my ($count_name, $value_name) = $tix->SetupGroupings(
Query => $Query, GroupBy => $PrimaryGroupBy,
);