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

Alex Vandiver alexmv at bestpractical.com
Wed Mar 13 17:56:12 EDT 2013


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

- Log -----------------------------------------------------------------
commit 0c7cda5a325486df2d4e3880074cd81e4a7fdad2
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 bdd8e6c4a76ebeaf977200c1bda32d7ddb9a09ff
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..27517c3 100644
--- a/share/html/Elements/ColumnMap
+++ b/share/html/Elements/ColumnMap
@@ -120,7 +120,7 @@ $COLUMN_MAP = {
         },
         render    => sub {
             my ($cf, $ocfvs) = @_;
-            my $comp = $m->comp_exists("/Elements/ShowCustomField".$cf->Type)
+            my $comp = ($cf->Id && $m->comp_exists("/Elements/ShowCustomField".$cf->Type))
                      ? "/Elements/ShowCustomField".$cf->Type
                      : undef;
 

commit 34aa02ae9df383b6b87db104af8ffa1311fbec95
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 27517c3..24e4546 100644
--- a/share/html/Elements/ColumnMap
+++ b/share/html/Elements/ColumnMap
@@ -112,7 +112,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