mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
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'.
This commit is contained in:
parent
3d69f70d66
commit
46b799a5b7
1 changed files with 16 additions and 15 deletions
|
@ -61,27 +61,27 @@ void ColumnDepends::setStyle (const std::string& value)
|
||||||
// Set the minimum and maximum widths for the value.
|
// Set the minimum and maximum widths for the value.
|
||||||
void ColumnDepends::measure (Task& task, int& minimum, int& maximum)
|
void ColumnDepends::measure (Task& task, int& minimum, int& maximum)
|
||||||
{
|
{
|
||||||
std::vector <Task> blocked;
|
std::vector <Task> blocking;
|
||||||
dependencyGetBlocking (task, blocked);
|
dependencyGetBlocking (task, blocking);
|
||||||
|
|
||||||
if (_style == "indicator") minimum = maximum = context.config.get ("dependency.indicator").length ();
|
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")
|
else if (_style == "default")
|
||||||
{
|
{
|
||||||
minimum = maximum = 0;
|
minimum = maximum = 0;
|
||||||
if (task.has ("depends"))
|
if (task.has ("depends"))
|
||||||
{
|
{
|
||||||
std::vector <int> blocked_ids;
|
std::vector <int> blocking_ids;
|
||||||
std::vector <Task>::iterator i;
|
std::vector <Task>::iterator i;
|
||||||
for (i = blocked.begin (); i != blocked.end (); ++i)
|
for (i = blocking.begin (); i != blocking.end (); ++i)
|
||||||
blocked_ids.push_back (i->id);
|
blocking_ids.push_back (i->id);
|
||||||
|
|
||||||
std::string all;
|
std::string all;
|
||||||
join (all, " ", blocked_ids);
|
join (all, " ", blocking_ids);
|
||||||
maximum = all.length ();
|
maximum = all.length ();
|
||||||
|
|
||||||
int length;
|
int length;
|
||||||
for (i = blocked.begin (); i != blocked.end (); ++i)
|
for (i = blocking.begin (); i != blocking.end (); ++i)
|
||||||
{
|
{
|
||||||
length = format (i->id).length ();
|
length = format (i->id).length ();
|
||||||
if (length > minimum)
|
if (length > minimum)
|
||||||
|
@ -110,23 +110,24 @@ void ColumnDepends::render (
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector <Task> blocked;
|
std::vector <Task> blocking;
|
||||||
dependencyGetBlocking (task, blocked);
|
dependencyGetBlocking (task, blocking);
|
||||||
|
|
||||||
if (_style == "count")
|
if (_style == "count")
|
||||||
{
|
{
|
||||||
lines.push_back (
|
lines.push_back (
|
||||||
color.colorize (
|
color.colorize (
|
||||||
rightJustify ("[" + format ((int)blocked.size ()) + "]", width)));
|
rightJustify ("[" + format ((int)blocking.size ()) + "]", width)));
|
||||||
}
|
}
|
||||||
else if (_style == "default")
|
else if (_style == "default")
|
||||||
{
|
{
|
||||||
std::vector <Task> blocked;
|
std::vector <int> blocking_ids;
|
||||||
dependencyGetBlocking (task, blocked);
|
std::vector <Task>::iterator t;
|
||||||
|
for (t = blocking.begin (); t != blocking.end (); ++t)
|
||||||
|
blocking_ids.push_back (t->id);
|
||||||
|
|
||||||
std::string combined;
|
std::string combined;
|
||||||
std::vector <int> blocked_ids;
|
join (combined, " ", blocking_ids);
|
||||||
join (combined, " ", blocked_ids);
|
|
||||||
|
|
||||||
std::vector <std::string> all;
|
std::vector <std::string> all;
|
||||||
wrapText (all, combined, width);
|
wrapText (all, combined, width);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue