mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-20 13:23:08 +02:00
TDB2
- Converted _urgency command from tdb to tdb2.
This commit is contained in:
parent
c23f663408
commit
1b25c415b0
1 changed files with 2 additions and 10 deletions
|
@ -50,17 +50,9 @@ CmdUrgency::CmdUrgency ()
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int CmdUrgency::execute (std::string& output)
|
int CmdUrgency::execute (std::string& output)
|
||||||
{
|
{
|
||||||
// Get all the tasks.
|
|
||||||
std::vector <Task> tasks;
|
|
||||||
context.tdb.lock (context.config.getBoolean ("locking"));
|
|
||||||
handleRecurrence ();
|
|
||||||
context.tdb.loadPending (tasks);
|
|
||||||
context.tdb.commit ();
|
|
||||||
context.tdb.unlock ();
|
|
||||||
|
|
||||||
// Apply filter.
|
// Apply filter.
|
||||||
std::vector <Task> filtered;
|
std::vector <Task> filtered;
|
||||||
filter (tasks, filtered);
|
filter (filtered);
|
||||||
|
|
||||||
if (filtered.size () == 0)
|
if (filtered.size () == 0)
|
||||||
{
|
{
|
||||||
|
@ -68,7 +60,7 @@ int CmdUrgency::execute (std::string& output)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find the task(s).
|
// Display urgency for the selected tasks.
|
||||||
std::stringstream out;
|
std::stringstream out;
|
||||||
std::vector <Task>::iterator task;
|
std::vector <Task>::iterator task;
|
||||||
for (task = filtered.begin (); task != filtered.end (); ++task)
|
for (task = filtered.begin (); task != filtered.end (); ++task)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue