mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Code Cleanup
- Improved the consistency of info output regarding recurring task parent and child tasks.
This commit is contained in:
parent
d8913c2f15
commit
d3ca5c04e3
1 changed files with 32 additions and 36 deletions
|
@ -470,49 +470,45 @@ int handleInfo (std::string &outs)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (task->getStatus () == Task::recurring ||
|
// recur
|
||||||
task->has ("parent"))
|
if (task->has ("recur"))
|
||||||
{
|
{
|
||||||
// recur
|
row = table.addRow ();
|
||||||
if (task->has ("recur"))
|
table.addCell (row, 0, "Recurrence");
|
||||||
{
|
value = task->get ("recur");
|
||||||
row = table.addRow ();
|
context.hooks.trigger ("format-recur", "recur", value);
|
||||||
table.addCell (row, 0, "Recurrence");
|
table.addCell (row, 1, value);
|
||||||
value = task->get ("recur");
|
}
|
||||||
context.hooks.trigger ("format-recur", "recur", value);
|
|
||||||
table.addCell (row, 1, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
// until
|
// until
|
||||||
if (task->has ("until"))
|
if (task->has ("until"))
|
||||||
{
|
{
|
||||||
row = table.addRow ();
|
row = table.addRow ();
|
||||||
table.addCell (row, 0, "Recur until");
|
table.addCell (row, 0, "Recur until");
|
||||||
|
|
||||||
Date dt (atoi (task->get ("until").c_str ()));
|
Date dt (atoi (task->get ("until").c_str ()));
|
||||||
std::string format = context.config.get ("reportdateformat");
|
std::string format = context.config.get ("reportdateformat");
|
||||||
if (format == "")
|
if (format == "")
|
||||||
format = context.config.get ("dateformat");
|
format = context.config.get ("dateformat");
|
||||||
|
|
||||||
std::string until = getDueDate (*task, format);
|
std::string until = getDueDate (*task, format);
|
||||||
table.addCell (row, 1, until);
|
table.addCell (row, 1, until);
|
||||||
}
|
}
|
||||||
|
|
||||||
// mask
|
// mask
|
||||||
if (task->has ("mask"))
|
if (task->getStatus () == Task::recurring)
|
||||||
{
|
{
|
||||||
row = table.addRow ();
|
row = table.addRow ();
|
||||||
table.addCell (row, 0, "Mask");
|
table.addCell (row, 0, "Mask");
|
||||||
table.addCell (row, 1, task->get ("mask"));
|
table.addCell (row, 1, task->get ("mask"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (task->has ("parent"))
|
||||||
|
{
|
||||||
// parent
|
// parent
|
||||||
if (task->has ("parent"))
|
row = table.addRow ();
|
||||||
{
|
table.addCell (row, 0, "Parent task");
|
||||||
row = table.addRow ();
|
table.addCell (row, 1, task->get ("parent"));
|
||||||
table.addCell (row, 0, "Parent task");
|
|
||||||
table.addCell (row, 1, task->get ("parent"));
|
|
||||||
}
|
|
||||||
|
|
||||||
// imask
|
// imask
|
||||||
row = table.addRow ();
|
row = table.addRow ();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue