///////////////////////////////////////////////////////////////////////////
| 150 | |
| 151 | //////////////////////////////////////////////////////////////////////////////// |
| 152 | int CmdModify::modifyRecurrenceSiblings( |
| 153 | Task& task, std::map<std::string, std::string>* projectChanges /* = NULL */) { |
| 154 | auto count = 0; |
| 155 | |
| 156 | if ((Context::getContext().config.get("recurrence.confirmation") == "prompt" && |
| 157 | confirm(STRING_CMD_MODIFY_RECUR)) || |
| 158 | Context::getContext().config.getBoolean("recurrence.confirmation")) { |
| 159 | std::vector<Task> siblings = Context::getContext().tdb2.siblings(task); |
| 160 | for (auto& sibling : siblings) { |
| 161 | Task alternate(sibling); |
| 162 | sibling.modify(Task::modReplace); |
| 163 | updateRecurrenceMask(sibling); |
| 164 | ++count; |
| 165 | feedback_affected(STRING_CMD_MODIFY_TASK_R, sibling); |
| 166 | feedback_unblocked(sibling); |
| 167 | Context::getContext().tdb2.modify(sibling); |
| 168 | if (Context::getContext().verbose("project") && projectChanges) |
| 169 | (*projectChanges)[sibling.get("project")] = onProjectChange(alternate, sibling); |
| 170 | } |
| 171 | |
| 172 | // Modify the parent |
| 173 | Task parent; |
| 174 | Context::getContext().tdb2.get(task.get("parent"), parent); |
| 175 | parent.modify(Task::modReplace); |
| 176 | Context::getContext().tdb2.modify(parent); |
| 177 | } |
| 178 | |
| 179 | return count; |
| 180 | } |
| 181 | |
| 182 | //////////////////////////////////////////////////////////////////////////////// |
| 183 | int CmdModify::modifyRecurrenceParent( |
nothing calls this directly
no test coverage detected