[Rt-commit] rt branch, 4.2/charts, updated. rt-4.1.8-496-g0e53c0d

Ruslan Zakirov ruz at bestpractical.com
Fri Jun 28 11:48:20 EDT 2013


The branch, 4.2/charts has been updated
       via  0e53c0da0421a48b8b89ebbd2b6ea98ef1d286cb (commit)
       via  344d1cec4faa9189563f28f0bf04c4efbf34ff3c (commit)
      from  b0c5f306180bc4fef32c583cf4532454cf1beacc (commit)

Summary of changes:
 lib/RT/Report/Tickets.pm | 12 ++++++------
 share/html/Search/Chart  |  1 +
 2 files changed, 7 insertions(+), 6 deletions(-)

- Log -----------------------------------------------------------------
commit 344d1cec4faa9189563f28f0bf04c4efbf34ff3c
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Fri Jun 28 17:40:46 2013 +0400

    values and fetched in SB are lower cased
    
    In places where we directly access $sb->{'values'} or
    fetched use lc() as these hashes are with lowercased
    keys.
    
    Problem shows in situations when $sb->Column(...) returns value
    based on FIELD argument which can have mixed case. For example
    ALL(TimeWorked) statistics demontstrates the problem.

diff --git a/lib/RT/Report/Tickets.pm b/lib/RT/Report/Tickets.pm
index 6de24e2..1c29e9a 100644
--- a/lib/RT/Report/Tickets.pm
+++ b/lib/RT/Report/Tickets.pm
@@ -699,13 +699,13 @@ sub CalculatePostFunction {
 
     my $base_query = $self->Query;
     foreach my $item ( @{ $self->{'items'} } ) {
-        $item->{'values'}{$column} = $code->(
+        $item->{'values'}{ lc $column } = $code->(
             $self,
             Query => join(
                 ' AND ', map "($_)", grep defined && length, $base_query, $item->Query,
             ),
         );
-        $item->{'fetched'}{$column} = 1;
+        $item->{'fetched'}{ lc $column } = 1;
     }
 }
 
@@ -717,15 +717,15 @@ sub MapSubValues {
     my $map = $info->{'MAP'};
 
     foreach my $item ( @{ $self->{'items'} } ) {
-        my $dst = $item->{'values'}{ $to } = { };
+        my $dst = $item->{'values'}{ lc $to } = { };
         while (my ($k, $v) = each %{ $map } ) {
-            $dst->{ $k } = delete $item->{'values'}{ $v->{'NAME'} };
+            $dst->{ $k } = delete $item->{'values'}{ lc $v->{'NAME'} };
             utf8::decode( $dst->{ $k } )
                 if defined $dst->{ $k }
                and not utf8::is_utf8( $dst->{ $k } );
-            delete $item->{'fetched'}{ $v->{'NAME'} };
+            delete $item->{'fetched'}{ lc $v->{'NAME'} };
         }
-        $item->{'fetched'}{ $to } = 1;
+        $item->{'fetched'}{ lc $to } = 1;
     }
 }
 

commit 0e53c0da0421a48b8b89ebbd2b6ea98ef1d286cb
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Fri Jun 28 17:46:11 2013 +0400

    use hide_overlapping_values in any case
    
    Our calculations can be wrong, if GD new enough then we
    can correct mistakes. Hidden labels are better than out
    of bounds.

diff --git a/share/html/Search/Chart b/share/html/Search/Chart
index e308372..c785309 100644
--- a/share/html/Search/Chart
+++ b/share/html/Search/Chart
@@ -387,6 +387,7 @@ if ($chart_class eq "GD::Graph::bars") {
                 $chart_options{'hide_overlapping_values'} = 1;
             }
         }
+        $chart_options{'hide_overlapping_values'} = 1;
     }
 
     %chart_options = (

-----------------------------------------------------------------------


More information about the Rt-commit mailing list