X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FSearch%2FElements%2FChart;h=60ee3b9c47f5ce39de4dd410f3540ef08e0da850;hb=d32f4c43b0fde5c18b8c2ee8f3d4cb9c6861a403;hp=b74aba46d22bd06e5023bd31b621002ca9b6b1cf;hpb=fc6209f398899f0211cfcedeb81a3cd65e04a941;p=freeside.git diff --git a/rt/share/html/Search/Elements/Chart b/rt/share/html/Search/Elements/Chart index b74aba46d..60ee3b9c4 100644 --- a/rt/share/html/Search/Elements/Chart +++ b/rt/share/html/Search/Elements/Chart @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -56,6 +56,8 @@ use RT::Report::Tickets; $PrimaryGroupBy ||= 'Queue'; # make sure PrimaryGroupBy is not undef 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, );