mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Import: Reuse CmdModify's checks
- Make updating tasks with "task import" run the same checks and update the same things as "task modify" would.
This commit is contained in:
parent
9067194390
commit
f4361d5c65
2 changed files with 7 additions and 2 deletions
|
@ -34,6 +34,7 @@
|
|||
#include <i18n.h>
|
||||
#include <main.h>
|
||||
#include <CmdImport.h>
|
||||
#include <CmdModify.h>
|
||||
|
||||
extern Context context;
|
||||
|
||||
|
@ -122,9 +123,10 @@ int CmdImport::import (std::vector <std::string>& 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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue