Ticket #29 (closed defect: fixed)

Opened 2 years ago

Last modified 10 months ago

--not-done don't mark children as not done

Reported by: anonymous Assigned to: athomas
Priority: major Component: DevTodo
Severity: normal Keywords:
Cc:

Description

man devtodo says:

-D, --not-done <indices>

Mark the specified notes (and all children) as not done.

But it only marks given indices as not done without children. Probably it should work the same as markDone.

int TodoDB::markNotDone(Todo &todo) {
int count = 1;

	todo.done = false;
	for (multiset<Todo>::iterator i = todo.child->begin(); i != todo.child->end(); i++)
		count += markNotDone(const_cast<Todo&>(*i));
	return count;
}
void TodoDB::notdone() {
	...
		if (t) {
			marked += markNotDone(*t);
			if (options.verbose > 1)
				cout << "todo: marked '" << *j << "' as not done" << endl;

			t->db->setDirty(true);
	...
}

Attachments

Change History

01/01/07 20:41:06 changed by athomas

  • status changed from new to assigned.

09/06/07 21:45:54 changed by athomas

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [462]) Dev Todo: Fixed #32, #29. Thanks!


Add/Change #29 (--not-done don't mark children as not done)




Change Properties
Action