[Tasks] Add rule to update multiple task elements (#2427)

On live if a task update would affect multiple elements, only the first
one gets updated. This was added as part of the changes in 7482cfc0.

Setting `UpdateOneElementPerTask` to false will restore the old behavior
that increments all active elements matching the task update criteria.
This commit is contained in:
hg
2022-09-06 12:42:45 -04:00
committed by GitHub
parent 78223b7ebf
commit 2c9fe4f2b8
2 changed files with 6 additions and 1 deletions
+5 -1
View File
@@ -592,7 +592,11 @@ int ClientTaskState::UpdateTasks(Client* client, const TaskUpdateFilter& filter,
int updated = IncrementDoneCount(client, task, client_task.slot, client_activity.activity_id, count);
max_updated = std::max(max_updated, updated);
break; // only one element updated per task, move to next task
if (RuleB(TaskSystem, UpdateOneElementPerTask))
{
break; // only one element updated per task, move to next task
}
}
}
}