///////////////////////////////////////////////////////////////////////////
| 181 | |
| 182 | //////////////////////////////////////////////////////////////////////////////// |
| 183 | int 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 | //////////////////////////////////////////////////////////////////////////////// |
nothing calls this directly
no test coverage detected