[Rt-commit] rt branch, 4.2/columnmap-cf-warnings, created. rt-4.1.6-384-g7407503

Alex Vandiver alexmv at bestpractical.com
Mon Mar 25 16:59:07 EDT 2013


The branch, 4.2/columnmap-cf-warnings has been created
        at  7407503d55ebea6ecab1b2f00d424a2f1e6e25d6 (commit)

- Log -----------------------------------------------------------------
commit 72d542f22dd69a9a743de0d8e3c2852e133a3bbb
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Mar 13 17:42:14 2013 -0400

    Be more verbose about the Queue, Class, or what-have you that failed to load
    
    This is relevant when the format contains a custom field which applies
    to only some of the results.

diff --git a/share/html/Elements/ColumnMap b/share/html/Elements/ColumnMap
index 98bebf5..4576249 100644
--- a/share/html/Elements/ColumnMap
+++ b/share/html/Elements/ColumnMap
@@ -112,7 +112,8 @@ $COLUMN_MAP = {
             my $cf = $m->notes($key);
             unless ($cf) {
                 $cf = $_[0]->LoadCustomFieldByIdentifier($_[-1]);
-                RT->Logger->debug("Unable to load $_[-1]") unless $cf->Id;
+                RT->Logger->debug("Unable to load $_[-1] for ".$_[0]->CustomFieldLookupType." ".$_[0]->CustomFieldLookupId)
+                    unless $cf->Id;
                 $m->notes($key, $cf);
             }
             return $cf;

commit 9754116b8f5c29862e7cbd609b24f10ac79b1dfd
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Mar 13 17:43:13 2013 -0400

    If the custom field failed to load, prevent an undef warning once per row
    
    A warning has already been printed; no need hide it under a spew of "Use
    of uninitialized value in concatenation" messages.

diff --git a/share/html/Elements/ColumnMap b/share/html/Elements/ColumnMap
index 4576249..2ea13f3 100644
--- a/share/html/Elements/ColumnMap
+++ b/share/html/Elements/ColumnMap
@@ -99,6 +99,7 @@ $COLUMN_MAP = {
         value     => sub {
             my $self = $COLUMN_MAP->{CustomField};
             my $cf   = $self->{load}->(@_);
+            return unless $cf->Id;
             return $self->{render}->( $cf, $cf->ValuesForObject($_[0])->ItemsArrayRef );
         },
         load      => sub {

commit 7407503d55ebea6ecab1b2f00d424a2f1e6e25d6
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Mar 13 17:55:29 2013 -0400

    Increase log level for CF load failure in ColumnMap
    
    This makes the failure slightly more evident, now that the per-row
    warnings are suppressed.

diff --git a/share/html/Elements/ColumnMap b/share/html/Elements/ColumnMap
index 2ea13f3..f9e9b5f 100644
--- a/share/html/Elements/ColumnMap
+++ b/share/html/Elements/ColumnMap
@@ -113,7 +113,7 @@ $COLUMN_MAP = {
             my $cf = $m->notes($key);
             unless ($cf) {
                 $cf = $_[0]->LoadCustomFieldByIdentifier($_[-1]);
-                RT->Logger->debug("Unable to load $_[-1] for ".$_[0]->CustomFieldLookupType." ".$_[0]->CustomFieldLookupId)
+                RT->Logger->notice("Unable to load $_[-1] for ".$_[0]->CustomFieldLookupType." ".$_[0]->CustomFieldLookupId)
                     unless $cf->Id;
                 $m->notes($key, $cf);
             }

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


More information about the Rt-commit mailing list