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

Method modifyRecurrenceParent

src/commands/CmdModify.cpp:183–205  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

181
182////////////////////////////////////////////////////////////////////////////////
183int CmdModify::modifyRecurrenceParent(
184 Task& task, std::map<std::string, std::string>* projectChanges /* = NULL */) {
185 auto count = 0;
186
187 auto children = Context::getContext().tdb2.children(task);
188 if (children.size() &&
189 ((Context::getContext().config.get("recurrence.confirmation") == "prompt" &&
190 confirm(STRING_CMD_MODIFY_RECUR)) ||
191 Context::getContext().config.getBoolean("recurrence.confirmation"))) {
192 for (auto& child : children) {
193 Task alternate(child);
194 child.modify(Task::modReplace);
195 updateRecurrenceMask(child);
196 Context::getContext().tdb2.modify(child);
197 if (Context::getContext().verbose("project") && projectChanges)
198 (*projectChanges)[child.get("project")] = onProjectChange(alternate, child);
199 ++count;
200 feedback_affected(STRING_CMD_MODIFY_TASK_R, child);
201 }
202 }
203
204 return count;
205}
206
207////////////////////////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 7

updateRecurrenceMaskFunction · 0.85
onProjectChangeFunction · 0.85
feedback_affectedFunction · 0.85
childrenMethod · 0.80
verboseMethod · 0.80
getMethod · 0.45
modifyMethod · 0.45

Tested by

no test coverage detected