From 75162bb14b3e38d66617077843f4dfdcaf09d5c4 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 18 Apr 2011 23:15:19 +0000 Subject: import rt 3.8.10 --- rt/share/html/Search/Chart | 3 ++- rt/share/html/Search/Elements/Chart | 2 ++ rt/share/html/Search/Elements/SelectPersonType | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'rt/share/html/Search') 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, ); diff --git a/rt/share/html/Search/Elements/Chart b/rt/share/html/Search/Elements/Chart index b74aba46d..e25a9efd0 100644 --- a/rt/share/html/Search/Elements/Chart +++ b/rt/share/html/Search/Elements/Chart @@ -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, ); diff --git a/rt/share/html/Search/Elements/SelectPersonType b/rt/share/html/Search/Elements/SelectPersonType index 2d2097304..6454acff3 100644 --- a/rt/share/html/Search/Elements/SelectPersonType +++ b/rt/share/html/Search/Elements/SelectPersonType @@ -72,7 +72,7 @@ else { @types = qw(Requestor Cc AdminCc Watcher Owner QueueCc QueueAdminCc QueueWatcher); } -my @subtypes = qw(EmailAddress Name RealName Nickname Organization Address1 Address2 WorkPhone HomePhone MobilePhone PagerPhone id); +my @subtypes = @{ $RT::Tickets::SEARCHABLE_SUBFIELDS{'User'} }; <%ARGS> -- cgit v1.2.1