X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Flib%2FRT%2FReport%2FTickets.pm;h=aa27b17f3bf08b8b9660b2cf0c2b9c2689e5561d;hb=45d35d5739d05e602bc317739485693e0e9ff0b5;hp=de40dbdd40d809d6c581b43ed1377f97a2f54668;hpb=85e677b86fc37c54e6de2b06340351a28f5a5916;p=freeside.git diff --git a/rt/lib/RT/Report/Tickets.pm b/rt/lib/RT/Report/Tickets.pm index de40dbdd4..aa27b17f3 100644 --- a/rt/lib/RT/Report/Tickets.pm +++ b/rt/lib/RT/Report/Tickets.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -57,22 +57,27 @@ use warnings; sub Groupings { my $self = shift; my %args = (@_); - my @fields = map {$_, $_} qw( - Status - Queue - ); - - foreach my $type ( qw(Owner Creator LastUpdatedBy Requestor Cc AdminCc Watcher) ) { - push @fields, $type.' '.$_, $type.'.'.$_ foreach qw( - Name EmailAddress RealName NickName Organization Lang City Country Timezone - ); + my @fields = + map { $self->CurrentUser->loc($_), $_ } qw( Status Queue ); # loc_qw + + foreach my $type ( qw(Owner Creator LastUpdatedBy Requestor Cc AdminCc Watcher) ) { # loc_qw + for my $field ( + qw( Name EmailAddress RealName NickName Organization Lang City Country Timezone ) # loc_qw + ) + { + push @fields, + $self->CurrentUser->loc($type) . ' ' + . $self->CurrentUser->loc($field), $type . '.' . $field; + } } - for my $field (qw(Due Resolved Created LastUpdated Started Starts Told)) { - for my $frequency (qw(Hourly Daily Monthly Annually)) { - my $item = $field.$frequency; - push @fields, $item, $item; + for my $field (qw(Due Resolved Created LastUpdated Started Starts Told)) { # loc_qw + for my $frequency (qw(Hourly Daily Monthly Annually)) { # loc_qw + push @fields, + $self->CurrentUser->loc($field) + . $self->CurrentUser->loc($frequency), + $field . $frequency; } } @@ -93,7 +98,11 @@ sub Groupings { } $CustomFields->LimitToGlobal; while ( my $CustomField = $CustomFields->Next ) { - push @fields, "Custom field '". $CustomField->Name ."'", "CF.{". $CustomField->id ."}"; + push @fields, $self->CurrentUser->loc( + "Custom field '[_1]'", + $CustomField->Name + ), + "CF.{" . $CustomField->id . "}"; } } return @fields; @@ -102,7 +111,7 @@ sub Groupings { sub Label { my $self = shift; my $field = shift; - if ( $field =~ /^(?:CF|CustomField)\.{(.*)}$/ ) { + if ( $field =~ /^(?:CF|CustomField)\.\{(.*)\}$/ ) { my $cf = $1; return $self->CurrentUser->loc( "Custom field '[_1]'", $cf ) if $cf =~ /\D/; my $obj = RT::CustomField->new( $self->CurrentUser ); @@ -230,7 +239,7 @@ sub _FieldToFunction { $func = "SUBSTR($func,1,4)"; } $args{'FUNCTION'} = $func; - } elsif ( $field =~ /^(?:CF|CustomField)\.{(.*)}$/ ) { #XXX: use CFDecipher method + } elsif ( $field =~ /^(?:CF|CustomField)\.\{(.*)\}$/ ) { #XXX: use CFDecipher method my $cf_name = $1; my $cf = RT::CustomField->new( $self->CurrentUser ); $cf->Load($cf_name);