mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-10 04:00:37 +02:00
Task Validation
- Cleaned up the 'start' and 'stop' commands due to the new validation.
This commit is contained in:
parent
2ecafd5d5e
commit
66f8591fcd
2 changed files with 0 additions and 8 deletions
|
@ -79,7 +79,6 @@ int CmdStart::execute (std::string& output)
|
||||||
Task before (*task);
|
Task before (*task);
|
||||||
|
|
||||||
modify_task_annotate (*task, modifications);
|
modify_task_annotate (*task, modifications);
|
||||||
apply_defaults (*task);
|
|
||||||
|
|
||||||
// Add a start time.
|
// Add a start time.
|
||||||
task->setStart ();
|
task->setStart ();
|
||||||
|
@ -87,9 +86,6 @@ int CmdStart::execute (std::string& output)
|
||||||
if (context.config.getBoolean ("journal.time"))
|
if (context.config.getBoolean ("journal.time"))
|
||||||
task->addAnnotation (context.config.get ("journal.time.start.annotation"));
|
task->addAnnotation (context.config.get ("journal.time.start.annotation"));
|
||||||
|
|
||||||
// Only allow valid tasks.
|
|
||||||
task->validate ();
|
|
||||||
|
|
||||||
if (taskDiff (before, *task))
|
if (taskDiff (before, *task))
|
||||||
{
|
{
|
||||||
if (permission.confirmed (before, taskDifferences (before, *task) + STRING_CMD_DONE_PROCEED))
|
if (permission.confirmed (before, taskDifferences (before, *task) + STRING_CMD_DONE_PROCEED))
|
||||||
|
|
|
@ -78,7 +78,6 @@ int CmdStop::execute (std::string& output)
|
||||||
Task before (*task);
|
Task before (*task);
|
||||||
|
|
||||||
modify_task_annotate (*task, modifications);
|
modify_task_annotate (*task, modifications);
|
||||||
apply_defaults (*task);
|
|
||||||
|
|
||||||
// Remove the start time.
|
// Remove the start time.
|
||||||
task->remove ("start");
|
task->remove ("start");
|
||||||
|
@ -86,9 +85,6 @@ int CmdStop::execute (std::string& output)
|
||||||
if (context.config.getBoolean ("journal.time"))
|
if (context.config.getBoolean ("journal.time"))
|
||||||
task->addAnnotation (context.config.get ("journal.time.stop.annotation"));
|
task->addAnnotation (context.config.get ("journal.time.stop.annotation"));
|
||||||
|
|
||||||
// Only allow valid tasks.
|
|
||||||
task->validate ();
|
|
||||||
|
|
||||||
if (taskDiff (before, *task))
|
if (taskDiff (before, *task))
|
||||||
{
|
{
|
||||||
if (permission.confirmed (before, taskDifferences (before, *task) + STRING_CMD_DONE_PROCEED))
|
if (permission.confirmed (before, taskDifferences (before, *task) + STRING_CMD_DONE_PROCEED))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue