mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Enhancement - info on recurring tasks
- Added recurrence information (parent, mask, imask, recur, until) to the info report when the task is either a recurring task or a synthetic task.
This commit is contained in:
parent
2cc625f631
commit
410a63fe14
3 changed files with 39 additions and 21 deletions
|
@ -4,6 +4,8 @@
|
||||||
1.7.0 (?) ?
|
1.7.0 (?) ?
|
||||||
+ Improved the errors when parsing a corrupt or unrecognized pending.data
|
+ Improved the errors when parsing a corrupt or unrecognized pending.data
|
||||||
or completed.data file (thanks to T. Charles Yun).
|
or completed.data file (thanks to T. Charles Yun).
|
||||||
|
+ Added details to the "info" report about recurring tasks (thanks to T.
|
||||||
|
Charles Yun).
|
||||||
|
|
||||||
------ old releases ------------------------------
|
------ old releases ------------------------------
|
||||||
|
|
||||||
|
|
|
@ -116,6 +116,8 @@
|
||||||
<ul>
|
<ul>
|
||||||
<li>Improved the errors when parsing a corrupt or unrecognized pending.data
|
<li>Improved the errors when parsing a corrupt or unrecognized pending.data
|
||||||
or completed.data file (thanks to T. Charles Yun).
|
or completed.data file (thanks to T. Charles Yun).
|
||||||
|
<li>Added details to the "info" report about recurring tasks (thanks to T.
|
||||||
|
Charles Yun).
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -299,13 +299,17 @@ std::string handleInfo (TDB& tdb, T& task, Config& conf)
|
||||||
table.addCell (row, 0, "ID");
|
table.addCell (row, 0, "ID");
|
||||||
table.addCell (row, 1, refTask.getId ());
|
table.addCell (row, 1, refTask.getId ());
|
||||||
|
|
||||||
|
std::string status = refTask.getStatus () == T::pending ? "Pending"
|
||||||
|
: refTask.getStatus () == T::completed ? "Completed"
|
||||||
|
: refTask.getStatus () == T::deleted ? "Deleted"
|
||||||
|
: refTask.getStatus () == T::recurring ? "Recurring"
|
||||||
|
: "";
|
||||||
|
if (refTask.getAttribute ("parent") != "")
|
||||||
|
status += " (Recurring)";
|
||||||
|
|
||||||
row = table.addRow ();
|
row = table.addRow ();
|
||||||
table.addCell (row, 0, "Status");
|
table.addCell (row, 0, "Status");
|
||||||
table.addCell (row, 1, ( refTask.getStatus () == T::pending ? "Pending"
|
table.addCell (row, 1, status);
|
||||||
: refTask.getStatus () == T::completed ? "Completed"
|
|
||||||
: refTask.getStatus () == T::deleted ? "Deleted"
|
|
||||||
: refTask.getStatus () == T::recurring ? "Recurring"
|
|
||||||
: ""));
|
|
||||||
|
|
||||||
std::string description = refTask.getDescription ();
|
std::string description = refTask.getDescription ();
|
||||||
std::string when;
|
std::string when;
|
||||||
|
@ -336,26 +340,36 @@ std::string handleInfo (TDB& tdb, T& task, Config& conf)
|
||||||
table.addCell (row, 1, refTask.getAttribute ("priority"));
|
table.addCell (row, 1, refTask.getAttribute ("priority"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (refTask.getStatus () == T::recurring)
|
if (refTask.getStatus () == T::recurring ||
|
||||||
|
refTask.getAttribute ("parent") != "")
|
||||||
{
|
{
|
||||||
row = table.addRow ();
|
if (refTask.getAttribute ("recur") != "")
|
||||||
table.addCell (row, 0, "Recurrence");
|
{
|
||||||
table.addCell (row, 1, refTask.getAttribute ("recur"));
|
row = table.addRow ();
|
||||||
|
table.addCell (row, 0, "Recurrence");
|
||||||
|
table.addCell (row, 1, refTask.getAttribute ("recur"));
|
||||||
|
}
|
||||||
|
|
||||||
row = table.addRow ();
|
if (refTask.getAttribute ("until") != "")
|
||||||
table.addCell (row, 0, "Recur until");
|
{
|
||||||
table.addCell (row, 1, refTask.getAttribute ("until"));
|
row = table.addRow ();
|
||||||
|
table.addCell (row, 0, "Recur until");
|
||||||
|
table.addCell (row, 1, refTask.getAttribute ("until"));
|
||||||
|
}
|
||||||
|
|
||||||
row = table.addRow ();
|
if (refTask.getAttribute ("mask") != "")
|
||||||
table.addCell (row, 0, "Mask");
|
{
|
||||||
table.addCell (row, 1, refTask.getAttribute ("mask"));
|
row = table.addRow ();
|
||||||
}
|
table.addCell (row, 0, "Mask");
|
||||||
|
table.addCell (row, 1, refTask.getAttribute ("mask"));
|
||||||
|
}
|
||||||
|
|
||||||
if (refTask.getAttribute ("parent") != "")
|
if (refTask.getAttribute ("parent") != "")
|
||||||
{
|
{
|
||||||
row = table.addRow ();
|
row = table.addRow ();
|
||||||
table.addCell (row, 0, "Parent task");
|
table.addCell (row, 0, "Parent task");
|
||||||
table.addCell (row, 1, refTask.getAttribute ("parent"));
|
table.addCell (row, 1, refTask.getAttribute ("parent"));
|
||||||
|
}
|
||||||
|
|
||||||
row = table.addRow ();
|
row = table.addRow ();
|
||||||
table.addCell (row, 0, "Mask Index");
|
table.addCell (row, 0, "Mask Index");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue