MCPcopy Create free account
hub / github.com/GothenburgBitFactory/taskwarrior / countTasks

Function countTasks

src/feedback.cpp:245–266  ·  view source on GitHub ↗

//////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

243
244///////////////////////////////////////////////////////////////////////////////
245static void countTasks(const std::vector<Task>& all, const std::string& project, int& count_pending,
246 int& count_done) {
247 for (auto& it : all) {
248 if (it.get("project") == project) {
249 switch (it.getStatus()) {
250 case Task::pending:
251 case Task::waiting:
252 ++count_pending;
253 break;
254
255 case Task::completed:
256 ++count_done;
257 break;
258
259 case Task::deleted:
260 case Task::recurring:
261 default:
262 break;
263 }
264 }
265 }
266}
267
268////////////////////////////////////////////////////////////////////////////////

Callers 1

onProjectChangeFunction · 0.85

Calls 2

getStatusMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected