rt 4.0.23
[freeside.git] / rt / share / html / Elements / ColumnMap
index 12a6145..3ae10ea 100644 (file)
@@ -2,7 +2,7 @@
 %#
 %# COPYRIGHT:
 %#
-%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
 %#                                          <sales@bestpractical.com>
 %#
 %# (Except where explicitly superseded by other copyright notices)
@@ -111,9 +111,9 @@ my $COLUMN_MAP = {
 
             # Display custom field contents, separated by newlines.
             # For Image custom fields we also show a thumbnail here.
-
             my $values = $cf->ValuesForObject( $_[0] );
             return if $values->Count == 0;
+
             my @values;
             # it is guaranteed to be the same type for all fields, right?
             my $v = $values->First;
@@ -160,7 +160,7 @@ my $COLUMN_MAP = {
             my $arg = $DECODED_ARGS->{ $name };
             my $checked = '';
             if ( $arg && ref $arg ) {
-                $checked = 'checked="checked"' if grep $_ == $id, @$arg;
+                $checked = 'checked="checked"' if grep $_ == $id, grep { defined and length } @$arg;
             }
             elsif ( $arg ) {
                 $checked = 'checked="checked"' if $arg == $id;