Bug
- The modify command no longer claims that a task was modified if no changes were applied.
This commit is contained in:
@@ -551,6 +551,8 @@ void TDB2::modify (Task& task)
|
||||
Task original;
|
||||
get (task.get ("uuid"), original);
|
||||
|
||||
if (taskDiff (original, task))
|
||||
{
|
||||
std::string status = original.get ("status");
|
||||
if (status == "pending" ||
|
||||
status == "waiting" ||
|
||||
@@ -575,6 +577,7 @@ void TDB2::modify (Task& task)
|
||||
// Add modified task to backlog.
|
||||
backlog.add_task (task);
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void TDB2::commit ()
|
||||
|
||||
@@ -749,10 +749,9 @@ void Task::removeDependency (const std::string& uuid)
|
||||
std::string combined;
|
||||
join (combined, ",", deps);
|
||||
set ("depends", combined);
|
||||
}
|
||||
|
||||
recalc_urgency = true;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Task::removeDependency (int id)
|
||||
@@ -762,8 +761,6 @@ void Task::removeDependency (int id)
|
||||
removeDependency (uuid);
|
||||
else
|
||||
throw std::string (STRING_TASK_DEPEND_NO_UUID);
|
||||
|
||||
recalc_urgency = true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -78,7 +78,8 @@ int CmdModify::execute (std::string& output)
|
||||
Task before (*task);
|
||||
modify_task_description_replace (*task, modifications);
|
||||
|
||||
if (permission.confirmed (*task, taskDifferences (before, *task) + "Proceed with change?"))
|
||||
if (taskDiff (before, *task) &&
|
||||
permission.confirmed (*task, taskDifferences (before, *task) + "Proceed with change?"))
|
||||
{
|
||||
++count;
|
||||
context.tdb2.modify (*task);
|
||||
|
||||
Reference in New Issue
Block a user