Task Validation

- Cleaned up the 'start' and 'stop' commands due to the new validation.
This commit is contained in:
Paul Beckingham 2011-08-31 01:43:08 -04:00
parent 2ecafd5d5e
commit 66f8591fcd
2 changed files with 0 additions and 8 deletions

View file

@ -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))

View file

@ -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))