diff --git a/doc/man/task.1.in b/doc/man/task.1.in index 1194e5914..98cf9e74e 100644 --- a/doc/man/task.1.in +++ b/doc/man/task.1.in @@ -351,6 +351,9 @@ existing ones. Tasks are identified by their UUID. If no file or "-" is specified, import tasks from STDIN. +Setting rc.recurrence.confirmation to an appropriate level is recommended +if import is to be used in automated workflows. See taskrc(5). + For importing other file formats, the standard task release comes with a few example scripts, such as: diff --git a/src/commands/CmdImport.cpp b/src/commands/CmdImport.cpp index 9cd3df821..c903f175e 100644 --- a/src/commands/CmdImport.cpp +++ b/src/commands/CmdImport.cpp @@ -34,6 +34,7 @@ #include #include #include +#include extern Context context; @@ -122,9 +123,10 @@ int CmdImport::import (std::vector & lines) task.set ("modified", before.get ("modified")); if (taskDiff (before, task)) { - context.tdb2.modify (task); + CmdModify modHelper; + modHelper.checkConsistency (before, task); + count += modHelper.modifyAndUpdate (before, task); std::cout << " mod "; - ++count; } else {