[Rt-commit] rt branch, 4.2/charts-improvments, updated. rt-4.0.2-120-g9f08085

Ruslan Zakirov ruz at bestpractical.com
Fri Sep 23 14:22:53 EDT 2011


The branch, 4.2/charts-improvments has been updated
       via  9f0808588c949a3363ab6926d5365b149b4c1488 (commit)
       via  1b869a3fa9be5a426813fb39e516b7b3d12f889c (commit)
       via  146ed80d1c4ba4bd4e56ab47b16e75f074e549e7 (commit)
       via  932b4acb3edf29cbe1283f9f58a4622463139699 (commit)
      from  fd955ad46c6871275bade12a8de638e6a7aea05e (commit)

Summary of changes:
 lib/RT/Record.pm               |    1 +
 lib/RT/Report/Tickets.pm       |    2 ++
 lib/RT/Report/Tickets/Entry.pm |    2 +-
 3 files changed, 4 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit 932b4acb3edf29cbe1283f9f58a4622463139699
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Fri Sep 23 22:10:51 2011 +0400

    don't process references in Record::__Value
    
    Nothing stops LoadFromHash or something else to
    set Value to a hash reference or array. We use
    it in reporting for compound functions.

diff --git a/lib/RT/Record.pm b/lib/RT/Record.pm
index fcc7bed..c558def 100644
--- a/lib/RT/Record.pm
+++ b/lib/RT/Record.pm
@@ -625,6 +625,7 @@ sub __Value {
     }
 
     my $value = $self->SUPER::__Value($field);
+    return $value if ref $value;
 
     if ( $args{'decode_utf8'} ) {
         if ( !utf8::is_utf8($value) ) {

commit 146ed80d1c4ba4bd4e56ab47b16e75f074e549e7
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Fri Sep 23 22:14:02 2011 +0400

    take care of encoding when we set value to hash
    
    values as data structures is an experimental feature
    that only required in reports. We don't want to
    put everything into RT::Record::__Value method, so
    if something uses this feature then it should take
    care of upgrading data to perl strings.

diff --git a/lib/RT/Report/Tickets.pm b/lib/RT/Report/Tickets.pm
index cae93ff..9094cee 100644
--- a/lib/RT/Report/Tickets.pm
+++ b/lib/RT/Report/Tickets.pm
@@ -692,6 +692,7 @@ sub MapSubValues {
         my $dst = $item->{'values'}{ $to } = { };
         while (my ($k, $v) = each %{ $map } ) {
             $dst->{ $k } = delete $item->{'values'}{ $v->{'NAME'} };
+            utf8::decode( $dst->{ $k } ) unless utf8::is_utf8( $dst->{ $k } );
             delete $item->{'fetched'}{ $v->{'NAME'} };
         }
         $item->{'fetched'}{ $to } = 1;

commit 1b869a3fa9be5a426813fb39e516b7b3d12f889c
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Fri Sep 23 22:20:14 2011 +0400

    don't mess with class inheritance
    
    Now RT::Record can handle our situation

diff --git a/lib/RT/Report/Tickets/Entry.pm b/lib/RT/Report/Tickets/Entry.pm
index ee43e4d..c16af9b 100644
--- a/lib/RT/Report/Tickets/Entry.pm
+++ b/lib/RT/Report/Tickets/Entry.pm
@@ -107,7 +107,7 @@ sub LabelValue {
 }
 
 sub RawValue {
-    return (shift)->DBIx::SearchBuilder::Record::__Value( @_ );
+    return (shift)->__Value( @_ );
 }
 
 sub Query {

commit 9f0808588c949a3363ab6926d5365b149b4c1488
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Fri Sep 23 22:20:58 2011 +0400

    make COUNT to be stat calculated by default
    
    this fixes Quicksearch box without changing it,
    so we are backwards compatible enough.

diff --git a/lib/RT/Report/Tickets.pm b/lib/RT/Report/Tickets.pm
index 9094cee..e1dc9f3 100644
--- a/lib/RT/Report/Tickets.pm
+++ b/lib/RT/Report/Tickets.pm
@@ -469,6 +469,7 @@ sub SetupGroupings {
 
     my @function = grep defined && length,
         ref( $args{'Function'} )? @{ $args{'Function'} } : ($args{'Function'});
+    push @function, 'COUNT' unless @function;
     foreach my $e ( @function ) {
         $e = {
             TYPE => 'statistic',

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


More information about the Rt-commit mailing list