Merge branch '2.4.3' into lexer2

This commit is contained in:
Paul Beckingham
2015-03-25 07:52:36 -04:00
6 changed files with 17 additions and 5 deletions

View File

@@ -598,7 +598,7 @@ void TDB2::update (
const std::string& uuid,
Task& task,
const bool add_to_backlog,
const bool addition)
const bool addition /* = false */)
{
// Validate to add metadata.
task.validate (false);
@@ -607,6 +607,13 @@ void TDB2::update (
Task original;
if (not addition && get (task.get ("uuid"), original))
{
if (add_to_backlog)
{
// All locally modified tasks are timestamped, implicitly overwriting any
// changes the user or hooks tried to apply to the "modified" attribute.
task.setAsNow ("modified");
}
// Update the task, wherever it is.
if (!pending.modify_task (task))
completed.modify_task (task);

View File

@@ -323,8 +323,8 @@ bool Command::permission (
}
// 1 < Quantity < bulk modifications have optional confirmation, in the (y/n/a/q)
// style.
if (quantity < bulk && (!_needs_confirm || !confirmation))
// style. Bulk = 0 denotes infinite bulk.
if ((bulk == 0 || quantity < bulk) && (!_needs_confirm || !confirmation))
return true;
if (context.verbose ("blank") && !_first_iteration)

View File

@@ -252,6 +252,7 @@ std::string taskInfoDifferences (
for (name = beforeAtts.begin (); name != beforeAtts.end (); ++name)
if (*name != "uuid" &&
*name != "modified" &&
before.get (*name) != after.get (*name) &&
before.get (*name) != "" && after.get (*name) != "")
{