[Rt-commit] rt branch, 4.2/chart-label-looks-like-number, repushed

Alex Vandiver alexmv at bestpractical.com
Thu Feb 13 15:24:52 EST 2014


The branch 4.2/chart-label-looks-like-number was deleted and repushed:
       was 0c8118025e686862bba58d4f1effd8a8393fbfbe
       now 83f0973060cf0a82be2ce619f0c8ef3c9238fedf

1:  0c81180 ! 1:  83f0973 Sort chart label values numerically if they all look like numbers
    @@ -35,10 +35,13 @@
              }
              elsif ( $order eq 'numeric label' ) {
     -            push @SORT_OPS, sub { $_[0][$idx] <=> $_[1][$idx] };
    ++            my $nv = $self->loc("(no value)");
    ++            # Sort the (no value) elements first, by comparing for them
    ++            # first, and falling back to a numeric sort on all other
    ++            # values.
     +            push @SORT_OPS, sub {
    -+                # Suppress warning for (no value) entries
    -+                no warnings 'numeric';
    -+                $_[0][$idx] <=> $_[1][$idx] };
    ++                (($_[0][$idx] ne $nv) <=> ($_[1][$idx] ne $nv))
    ++             || ( $_[0][$idx]         <=>  $_[1][$idx]        ) };
                  $method = 'LabelValue';
              }
              elsif ( $order eq 'raw' ) {



More information about the rt-commit mailing list