%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
%# END BPS TAGGED BLOCK }}}
<%args>
$PrimaryGroupBy => 'Queue'
-$ChartStyle => 'bars'
+$ChartStyle => 'bar'
$Description => undef
</%args>
<%init>
+$m->callback( ARGSRef => \%ARGS, CallbackName => 'Initial' );
+
$ARGS{Query} ||= 'id > 0';
# FIXME: should be factored with RT::Report::Tickets::Label :(
my $PrimaryGroupByLabel;
-if ( $PrimaryGroupBy =~ /^(?:CF|CustomField)\.{(.*)}$/ ) {
+if ( $PrimaryGroupBy =~ /^(?:CF|CustomField)\.\{(.*)\}$/ ) {
my $cf = $1;
if ( $cf =~ /\D/ ) {
$PrimaryGroupByLabel = loc( "custom field '[_1]'", $cf );
);
for(@session_fields) {
+ $query{$_} = $DECODED_ARGS->{$_} unless defined $query{$_};
$query{$_} = $current->{$_} unless defined $query{$_};
- $query{$_} = $m->request_args->{$_} unless defined $query{$_};
}
- if ($m->request_args->{'SavedSearchLoadSubmit'}) {
- $query{'SavedChartSearchId'} = $m->request_args->{'SavedSearchLoad'};
+ if ($DECODED_ARGS->{'SavedSearchLoadSubmit'}) {
+ $query{'SavedChartSearchId'} = $DECODED_ARGS->{'SavedSearchLoad'};
}
- if ($m->request_args->{'SavedSearchSave'}) {
+ if ($DECODED_ARGS->{'SavedSearchSave'}) {
$query{'SavedChartSearchId'} = $saved_search->{'SearchId'};
}
}
+$m->callback( ARGSRef => \%ARGS, QueryArgsRef => \%query );
</%init>
<& /Elements/Header, Title => $title &>
<& /Elements/Tabs, QueryArgs => \%query &>
<& /Elements/ListActions, actions => \@actions &>
+
+% $m->callback( ARGSRef => \%ARGS, CallbackName => 'BeforeChart' );
+
<& /Search/Elements/Chart, %ARGS &>
+% $m->callback( ARGSRef => \%ARGS, CallbackName => 'AfterChart' );
+
<div class="chart-meta">
<div class="chart-type">
<&| /Widgets/TitleBox, title => loc('Chart Properties')&>