From 46b799a5b763fc6418c9f9e638da551d85c0a4c3 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Fri, 13 May 2011 17:59:01 -0400 Subject: [PATCH] Bug - The ColumnDepends object was failing to map uuid --> id and so rendered no data for the blocked report. - Code used the term 'blocked' when it should have used the term 'blocking'. --- src/columns/ColDepends.cpp | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/columns/ColDepends.cpp b/src/columns/ColDepends.cpp index cd70464d8..19c9b9665 100644 --- a/src/columns/ColDepends.cpp +++ b/src/columns/ColDepends.cpp @@ -61,27 +61,27 @@ void ColumnDepends::setStyle (const std::string& value) // Set the minimum and maximum widths for the value. void ColumnDepends::measure (Task& task, int& minimum, int& maximum) { - std::vector blocked; - dependencyGetBlocking (task, blocked); + std::vector blocking; + dependencyGetBlocking (task, blocking); if (_style == "indicator") minimum = maximum = context.config.get ("dependency.indicator").length (); - else if (_style == "count") minimum = maximum = 2 + format ((int) blocked.size ()).length (); + else if (_style == "count") minimum = maximum = 2 + format ((int) blocking.size ()).length (); else if (_style == "default") { minimum = maximum = 0; if (task.has ("depends")) { - std::vector blocked_ids; + std::vector blocking_ids; std::vector ::iterator i; - for (i = blocked.begin (); i != blocked.end (); ++i) - blocked_ids.push_back (i->id); + for (i = blocking.begin (); i != blocking.end (); ++i) + blocking_ids.push_back (i->id); std::string all; - join (all, " ", blocked_ids); + join (all, " ", blocking_ids); maximum = all.length (); int length; - for (i = blocked.begin (); i != blocked.end (); ++i) + for (i = blocking.begin (); i != blocking.end (); ++i) { length = format (i->id).length (); if (length > minimum) @@ -110,23 +110,24 @@ void ColumnDepends::render ( return; } - std::vector blocked; - dependencyGetBlocking (task, blocked); + std::vector blocking; + dependencyGetBlocking (task, blocking); if (_style == "count") { lines.push_back ( color.colorize ( - rightJustify ("[" + format ((int)blocked.size ()) + "]", width))); + rightJustify ("[" + format ((int)blocking.size ()) + "]", width))); } else if (_style == "default") { - std::vector blocked; - dependencyGetBlocking (task, blocked); + std::vector blocking_ids; + std::vector ::iterator t; + for (t = blocking.begin (); t != blocking.end (); ++t) + blocking_ids.push_back (t->id); std::string combined; - std::vector blocked_ids; - join (combined, " ", blocked_ids); + join (combined, " ", blocking_ids); std::vector all; wrapText (all, combined, width);