From ef20b2b6b1feb47ad02b5ff7525f1a0fd11d0fa4 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 2 Aug 2007 19:56:20 +0000 Subject: import rt 3.6.4 --- rt/html/Search/Elements/BuildFormatString | 27 +++-- rt/html/Search/Elements/Chart | 139 +++++++++++++++++++++++ rt/html/Search/Elements/DisplayOptions | 71 ++++++++---- rt/html/Search/Elements/EditFormat | 30 ++--- rt/html/Search/Elements/EditQuery | 24 ++-- rt/html/Search/Elements/EditSearches | 57 +++++----- rt/html/Search/Elements/NewListActions | 14 ++- rt/html/Search/Elements/PickBasics | 65 +++++------ rt/html/Search/Elements/PickCFs | 6 +- rt/html/Search/Elements/PickCriteria | 20 ++-- rt/html/Search/Elements/SearchPrivacy | 6 +- rt/html/Search/Elements/SearchesForObject | 65 +++++++++++ rt/html/Search/Elements/SelectAndOr | 10 +- rt/html/Search/Elements/SelectChartType | 56 +++++++++ rt/html/Search/Elements/SelectGroup | 14 ++- rt/html/Search/Elements/SelectGroupBy | 63 ++++++++++ rt/html/Search/Elements/SelectLinks | 12 +- rt/html/Search/Elements/SelectPersonType | 16 +-- rt/html/Search/Elements/SelectSearchObject | 6 +- rt/html/Search/Elements/SelectSearchesForObjects | 11 +- 20 files changed, 543 insertions(+), 169 deletions(-) create mode 100644 rt/html/Search/Elements/Chart create mode 100644 rt/html/Search/Elements/SearchesForObject create mode 100644 rt/html/Search/Elements/SelectChartType create mode 100644 rt/html/Search/Elements/SelectGroupBy (limited to 'rt/html/Search/Elements') diff --git a/rt/html/Search/Elements/BuildFormatString b/rt/html/Search/Elements/BuildFormatString index cffb81a48..3bd39b5c2 100644 --- a/rt/html/Search/Elements/BuildFormatString +++ b/rt/html/Search/Elements/BuildFormatString @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -171,12 +173,12 @@ elsif ( $AddCol ) { $column{Column} = $col; if ( $Face eq "Bold" ) { - $column{Prefix} .= ""; - $column{Suffix} .= ""; + $column{Prefix} .= ""; + $column{Suffix} .= ""; } if ( $Face eq "Italic" ) { - $column{Prefix} .= ""; - $column{Suffix} .= ""; + $column{Prefix} .= ""; + $column{Suffix} .= ""; } if ($Size) { $column{Prefix} .= "<" . $m->interp->apply_escapes( $Size, 'h' ) . ">"; @@ -184,11 +186,11 @@ elsif ( $AddCol ) { } if ( $Link eq "Display" ) { $column{Prefix} .= - ""; + ""; $column{Suffix} .= ""; } elsif ( $Link eq "Take" ) { - $column{Prefix} .= ""; $column{Suffix} .= ""; } @@ -223,10 +225,13 @@ elsif ( $ColDown ) { my @format_string; foreach my $field (@seen) { next unless $field; - my $row = "'" . $field->{Prefix}; - $row .= "__" . $m->interp->apply_escapes( $field->{Column}, 'h' ) . "__" + my $row = "'"; + $row .= $field->{Prefix} if $field->{Prefix}; + $row .= "__" . ($field->{Column} =~ m/\(/ ? $field->{Column} # func, don't escape + : $m->interp->apply_escapes( $field->{Column}, 'h' )) . "__" unless ( $field->{Column} eq "" ); - $row .= $field->{Suffix} . "'"; + $row .= $field->{Suffix} if $field->{Suffix}; + $row .= "'"; push( @format_string, $row ); } diff --git a/rt/html/Search/Elements/Chart b/rt/html/Search/Elements/Chart new file mode 100644 index 000000000..2eca6afda --- /dev/null +++ b/rt/html/Search/Elements/Chart @@ -0,0 +1,139 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# +%# +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# You should have received a copy of the GNU General Public License +%# along with this program; if not, write to the Free Software +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) +%# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. +%# +%# END BPS TAGGED BLOCK }}} +<%args> +$Query => "id > 0" +$PrimaryGroupBy => 'Queue' +$SecondaryGroupBy => undef +$ChartStyle => 'bars' + +<%init> +use RT::Report::Tickets; +my $tix = RT::Report::Tickets->new( $session{'CurrentUser'} ); +$tix->FromSQL( $Query ); +my $count_name = $tix->Column( FUNCTION => 'COUNT', FIELD => 'id' ); +$tix->GroupBy( FIELD => $PrimaryGroupBy ); +my $value_name = $tix->Column( FIELD => $PrimaryGroupBy ); + +my %class = ( + Queue => 'RT::Queue', + Owner => 'RT::User', +); +my $class = $class{ $PrimaryGroupBy }; + +my (@keys, @values); +while ( my $entry = $tix->Next ) { + if ($class) { + my $q = $class->new( $session{'CurrentUser'} ); + $q->Load( $entry->__Value( $value_name ) ); + push @keys, $q->Name; + } + else { + push @keys, $entry->__Value( $value_name ); + } + $keys[-1] ||= loc('(no value)'); + push @values, $entry->__Value( $count_name ); +} + +# XXX: Convert 1970-01-01 date to the 'Not Set' +# this code should be generalized!!! +if ( $PrimaryGroupBy =~ /(Daily|Monthly|Annually)$/ ) { + my $re; + $re = qr{1970-01-01} if $PrimaryGroupBy =~ /Daily$/; + $re = qr{1970-01} if $PrimaryGroupBy =~ /Monthly$/; + $re = qr{1970} if $PrimaryGroupBy =~ /Annually$/; + foreach (@keys) { + s/^$re/loc('Not Set')/e; + } +} + +my %data; +foreach my $key (@keys) { $data{$key} = shift @values; } +my @sorted_keys = sort @keys; +my @sorted_values = map { $data{$_}} @sorted_keys; + + +my $query_string = $m->comp('/Elements/QueryString', %ARGS); + + +<% loc('Query:') %> <% $Query %>
+ +
+ + + + + + +% my ($i,$total); +% while (my $key = shift @sorted_keys) { +% $i++; +% my $value = shift @sorted_values; +% $total += $value; + + + + +% } + +%$i++; + + + + + +
<% $tix->Label($PrimaryGroupBy) %> +<&|/l&>Tickets +
+<%$key%> + +<%$value%> +
+<%loc('Total')%> + +<%$total%> +
diff --git a/rt/html/Search/Elements/DisplayOptions b/rt/html/Search/Elements/DisplayOptions index 43a9d9998..4bed0902b 100644 --- a/rt/html/Search/Elements/DisplayOptions +++ b/rt/html/Search/Elements/DisplayOptions @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,43 +45,53 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<& /Elements/TitleBoxStart, title => loc("Display Columns") &> +<&| /Widgets/TitleBox, title => loc("Display Columns") &> - - @@ -97,11 +99,11 @@ - - + @@ -177,7 +166,7 @@ TrueVal=> '=', FalseVal => '!=' &> <%INIT> my @people = ('Actor', diff --git a/rt/html/Search/Elements/PickCFs b/rt/html/Search/Elements/PickCFs index 435a07ad3..734f5f871 100644 --- a/rt/html/Search/Elements/PickCFs +++ b/rt/html/Search/Elements/PickCFs @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Search/Elements/PickCriteria b/rt/html/Search/Elements/PickCriteria index 129344443..58b29fb57 100644 --- a/rt/html/Search/Elements/PickCriteria +++ b/rt/html/Search/Elements/PickCriteria @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,12 +45,12 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<& /Elements/TitleBoxStart, title => loc('Add Criteria')&> -
<& EditFormat, %ARGS &> - + - - -
+ + +% for my $o (0..3) { - + - +
+ +% if ($o == 0) { <&|/l&>Order by: - +% } +
+% } +
<&|/l&>Rows per page: <& /Elements/SelectResultsPerPage, @@ -91,14 +103,34 @@ SELECTED
-<& /Elements/TitleBoxEnd &> + <%INIT> my $tickets = new RT::Tickets($session{'CurrentUser'}); my %fields = %{$tickets->FIELDS}; map { $fields{$_}->[0] =~ /^(?:ENUM|INT|DATE|STRING)$/ || delete $fields{$_} } keys %fields; delete $fields{'EffectiveId'}; +$fields{ $_ . '.EmailAddress' } = 1 foreach( qw(Requestor Cc AdminCc) ); + +# Add all available CustomFields to the list of sortable columns. +my @cfs = grep /^CustomField/, @{$ARGS{AvailableColumns}}; +$fields{$_}=1 for @cfs; + +# Add PAW sort +$fields{'Custom.Ownership'} = 1; +my @Order; +my @OrderBy; +if ($OrderBy =~ /\|/) { + @OrderBy = split /\|/, $OrderBy; +} else { + @OrderBy = ( $OrderBy ); +} +if ($Order =~ /\|/) { + @Order = split /\|/, $Order; +} else { + @Order = ( $Order ); +} @@ -107,4 +139,5 @@ $Order => undef $OrderBy => undef $RowsPerPage => undef $Format => undef +$GroupBy => 'id' diff --git a/rt/html/Search/Elements/EditFormat b/rt/html/Search/Elements/EditFormat index dc8720f26..fa0ac96e0 100644 --- a/rt/html/Search/Elements/EditFormat +++ b/rt/html/Search/Elements/EditFormat @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -56,7 +58,7 @@ <&|/l&>Show Columns:
+ -
<&|/l&>Title: -
<&|/l&>Size: +
<&|/l&>Title: +
<&|/l&>Size: -
<&|/l&>Style: +
<&|/l&>Style:
- + - + -
+
- - - + + +
+
diff --git a/rt/html/Search/Elements/EditQuery b/rt/html/Search/Elements/EditQuery index 783541a64..5c40c2573 100644 --- a/rt/html/Search/Elements/EditQuery +++ b/rt/html/Search/Elements/EditQuery @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -44,20 +46,20 @@ %# %# END BPS TAGGED BLOCK }}} <& NewListActions, actions => $actions &> -<& /Elements/TitleBoxStart, title => join(': ', grep defined, loc("Query"), $Description) &> +<&|/Widgets/TitleBox, title => join(': ', grep defined, loc("Current search"), $Description) &>

- - - - - - -%# + + + + + + +%#

-<& /Elements/TitleBoxEnd &> + <%ARGS> $Description $optionlist diff --git a/rt/html/Search/Elements/EditSearches b/rt/html/Search/Elements/EditSearches index bc6b80e6f..9ab9f944d 100644 --- a/rt/html/Search/Elements/EditSearches +++ b/rt/html/Search/Elements/EditSearches @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,62 +45,59 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<& /Elements/TitleBoxStart, title => loc('Saved searches') &> +<&| /Widgets/TitleBox, title => loc($Title)&> %# Hide all the save functionality if the user shouldn't see it. % if ($session{'CurrentUser'}->HasRight( Right => 'CreateSavedSearch', % Object=> $RT::System )) { <&|/l&>Privacy: % if ($CurrentSearch->{'Object'} && $CurrentSearch->{'Object'}->id) { -<& SearchPrivacy, Object => $CurrentSearch->{'Object'}->Object &>
+<& SearchPrivacy, Object => $CurrentSearch->{'Object'}->Object &>
% } else { -<& SelectSearchObject, Name => 'Owner', Objects => \@Objects &>
+<& SelectSearchObject, Name => 'Owner', Objects => \@Objects &>
% } <&|/l&>Description:
- + % if ($SearchId ne 'new') { % if ($Dirty) { - + % } - - - - + +% if ($AllowCopy) { + % } + -% if ($Dirty or $SearchId eq 'new') { - % } -
+ +
% } -<&|/l&>Load saved search:
-<& SelectSearchesForObjects, Name => 'LoadSavedSearch', Objects => \@Objects&> - -<& /Elements/TitleBoxEnd &> +<&|/l&>Load saved search:
+<& SelectSearchesForObjects, Name => 'LoadSavedSearch', Objects => \@Objects, SearchType => $SearchType &> + + <%init> - unless ($session{'CurrentUser'}->HasRight( Right => 'LoadSavedSearch', - Object=> $RT::System )) { + Object=> $RT::System )) { return; } -my @Objects; - -push @Objects, $session{CurrentUser}->UserObj; - -my $groups = RT::Groups->new($session{'CurrentUser'}); -$groups->LimitToUserDefinedGroups; -$groups->WithMember(PrincipalId => $session{'CurrentUser'}->Id, - Recursively => 1); +use RT::SavedSearches; +my @Objects = RT::SavedSearches->new($session{CurrentUser})->_PrivacyObjects; +push @Objects, RT::System->new($session{'CurrentUser'}) + if $session{'CurrentUser'}->HasRight( Object=> $RT::System, + Right => 'SuperUser'); - push (@Objects, @{$groups->ItemsArrayRef()}); <%ARGS> +$SearchType => 'Ticket' $SearchId => undef $CurrentSearch => undef $Description => undef $HideResults => 0 $Dirty => 0 +$AllowCopy => 1 +$Title => 'Saved searches' diff --git a/rt/html/Search/Elements/NewListActions b/rt/html/Search/Elements/NewListActions index eb82544f3..535ac8cb9 100644 --- a/rt/html/Search/Elements/NewListActions +++ b/rt/html/Search/Elements/NewListActions @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -44,19 +46,19 @@ %# %# END BPS TAGGED BLOCK }}} % if ($actions[0] ) { -<%loc('Results')%>
+<%loc('Results')%>
% foreach my $action (@actions) { % next unless ($action); % my @item = @$action; % if ($item[1] < 0) { - + % } - <%$item[0]%>
+ <%$item[0]%>
% if ($item[1] < 0) {
% } % } -
+
% } <%init> @actions = grep (/./,@actions); diff --git a/rt/html/Search/Elements/PickBasics b/rt/html/Search/Elements/PickBasics index 8a48f6b18..44a378c14 100644 --- a/rt/html/Search/Elements/PickBasics +++ b/rt/html/Search/Elements/PickBasics @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -49,11 +51,11 @@
<& /Elements/SelectEqualityOperator, Name => "idOp" &> - +
+
<& /Elements/SelectAttachmentField, Name => 'AttachmentField' &> <& /Elements/SelectBoolean, Name => "AttachmentOp", @@ -63,7 +65,7 @@ FalseVal => 'NOT LIKE' &> - +
- + <& /Elements/SelectBoolean, Name => "ActorOp", TrueVal=> '=', @@ -117,21 +119,7 @@ <& /Elements/SelectMatch, Name => "WatcherOp" &> - -
-<& SelectPersonType, Name => 'WatcherGroupField', Default => 'RequestorGroup', Suffix => 'Group' &> - -<& /Elements/SelectBoolean, Name => "WatcherGroupOp", - True=> loc('belongs to'), - False=> loc('does not belong to'), - TrueVal=> '=', - FalseVal => '!=' -&> - -<& SelectGroup, Name => 'ValueOfWatcherGroup' &> -
@@ -143,28 +131,29 @@
- + <& /Elements/SelectEqualityOperator, Name => "TimeOp" &> - + +<& /Elements/SelectTimeUnits, Name =>'ValueOfTime' &>
- + <& /Elements/SelectEqualityOperator, Name => "PriorityOp" &> - +
- +
+<&| /Widgets/TitleBox, title => loc('Add Criteria')&> +
- -
+ + -
<&|/l&>Aggregator: <& SelectAndOr, Name => "AndOr" &> @@ -61,8 +63,8 @@
- +
+ <& PickBasics &> <& PickCFs, cfqueues => \%cfqueues &>
@@ -71,7 +73,7 @@
 
-<& /Elements/TitleBoxEnd &> + <%ARGS> $addquery => 0 diff --git a/rt/html/Search/Elements/SearchPrivacy b/rt/html/Search/Elements/SearchPrivacy index 270e1baa3..745ba62ac 100644 --- a/rt/html/Search/Elements/SearchPrivacy +++ b/rt/html/Search/Elements/SearchPrivacy @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Search/Elements/SearchesForObject b/rt/html/Search/Elements/SearchesForObject new file mode 100644 index 000000000..45aa4535e --- /dev/null +++ b/rt/html/Search/Elements/SearchesForObject @@ -0,0 +1,65 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# +%# +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# You should have received a copy of the GNU General Public License +%# along with this program; if not, write to the Free Software +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) +%# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. +%# +%# END BPS TAGGED BLOCK }}} +<%args> +$Object => undef + +<%init> +# Returns an array of search objects associated on $Object, +# in the form of [Description, searchObj] +my @result; +while (my $search = $Object->Attributes->Next) { + my $desc; + if ($search->Name eq 'SavedSearch') { + push @result, [$search->Description, $search]; + } + elsif ($search->Name =~ m/^Search - (.*)/) { + push @result, [$1, $search]; + } +} +return @result; + diff --git a/rt/html/Search/Elements/SelectAndOr b/rt/html/Search/Elements/SelectAndOr index 2f3c70477..c8122660a 100644 --- a/rt/html/Search/Elements/SelectAndOr +++ b/rt/html/Search/Elements/SelectAndOr @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,8 +45,8 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} -<&|/l&>AND -<&|/l&>OR +<&|/l&>AND +<&|/l&>OR <%ARGS> $Name => "Operator" diff --git a/rt/html/Search/Elements/SelectChartType b/rt/html/Search/Elements/SelectChartType new file mode 100644 index 000000000..43a6182bf --- /dev/null +++ b/rt/html/Search/Elements/SelectChartType @@ -0,0 +1,56 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# +%# +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# You should have received a copy of the GNU General Public License +%# along with this program; if not, write to the Free Software +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) +%# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. +%# +%# END BPS TAGGED BLOCK }}} +<%args> +$Name => 'ChartType' +$Default => 'bar' + + diff --git a/rt/html/Search/Elements/SelectGroup b/rt/html/Search/Elements/SelectGroup index edd53713f..3f78d3964 100644 --- a/rt/html/Search/Elements/SelectGroup +++ b/rt/html/Search/Elements/SelectGroup @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,14 +45,14 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - % if ($AllowNull) { - + % } %while (my $group = $groups->Next) { - + %} - + <%INIT> my $groups = new RT::Groups($session{'CurrentUser'}); diff --git a/rt/html/Search/Elements/SelectGroupBy b/rt/html/Search/Elements/SelectGroupBy new file mode 100644 index 000000000..0ffb5e453 --- /dev/null +++ b/rt/html/Search/Elements/SelectGroupBy @@ -0,0 +1,63 @@ +%# BEGIN BPS TAGGED BLOCK {{{ +%# +%# COPYRIGHT: +%# +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC +%# +%# +%# (Except where explicitly superseded by other copyright notices) +%# +%# +%# LICENSE: +%# +%# This work is made available to you under the terms of Version 2 of +%# the GNU General Public License. A copy of that license should have +%# been provided with this software, but in any event can be snarfed +%# from www.gnu.org. +%# +%# This work is distributed in the hope that it will be useful, but +%# WITHOUT ANY WARRANTY; without even the implied warranty of +%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +%# General Public License for more details. +%# +%# You should have received a copy of the GNU General Public License +%# along with this program; if not, write to the Free Software +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. +%# +%# +%# CONTRIBUTION SUBMISSION POLICY: +%# +%# (The following paragraph is not intended to limit the rights granted +%# to you to modify and distribute this software under the terms of +%# the GNU General Public License and is only of importance to you if +%# you choose to contribute your changes and enhancements to the +%# community by submitting them to Best Practical Solutions, LLC.) +%# +%# By intentionally submitting any modifications, corrections or +%# derivatives to this work, or any other work intended for use with +%# Request Tracker, to Best Practical Solutions, LLC, you confirm that +%# you are the copyright holder for those contributions and you grant +%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, +%# royalty-free, perpetual, license to use, copy, create derivative +%# works based on those contributions, and sublicense and distribute +%# those contributions and any derivatives thereof. +%# +%# END BPS TAGGED BLOCK }}} +<%args> +$Name => 'GroupBy' +$Default => 'Status' +$Query => '' + + +<%init> +use RT::Report::Tickets; +my $report = RT::Report::Tickets->new( $session{'CurrentUser'} ); +my @options = $report->Groupings( Query => $Query ); + diff --git a/rt/html/Search/Elements/SelectLinks b/rt/html/Search/Elements/SelectLinks index 00ec80bd3..f3586528d 100644 --- a/rt/html/Search/Elements/SelectLinks +++ b/rt/html/Search/Elements/SelectLinks @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,11 +45,11 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - % foreach (@fields) { - + % } - + <%ARGS> $Name => 'LinksField' diff --git a/rt/html/Search/Elements/SelectPersonType b/rt/html/Search/Elements/SelectPersonType index d4127c97b..bc631dbb0 100644 --- a/rt/html/Search/Elements/SelectPersonType +++ b/rt/html/Search/Elements/SelectPersonType @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -43,20 +45,20 @@ %# those contributions and any derivatives thereof. %# %# END BPS TAGGED BLOCK }}} - % if ($AllowNull) { - + % } % for my $option (@types) { % if ($Suffix) { - + % next; % } % foreach my $subtype (@subtypes) { - + % } % } - + <%INIT> my @types; diff --git a/rt/html/Search/Elements/SelectSearchObject b/rt/html/Search/Elements/SelectSearchObject index e9df5179f..f52a83372 100644 --- a/rt/html/Search/Elements/SelectSearchObject +++ b/rt/html/Search/Elements/SelectSearchObject @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: diff --git a/rt/html/Search/Elements/SelectSearchesForObjects b/rt/html/Search/Elements/SelectSearchesForObjects index e6be66a58..dc8368577 100644 --- a/rt/html/Search/Elements/SelectSearchesForObjects +++ b/rt/html/Search/Elements/SelectSearchesForObjects @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ %# %# You should have received a copy of the GNU General Public License %# along with this program; if not, write to the Free Software -%# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +%# 02110-1301 or visit their web page on the internet at +%# http://www.gnu.org/copyleft/gpl.html. %# %# %# CONTRIBUTION SUBMISSION POLICY: @@ -46,6 +48,7 @@ <%args> @Objects => undef $Name => undef +$SearchType => 'Ticket',