gtg
gtg copied to clipboard
Properly maintain the task count in Tag.set_parent (fix #404)
Hi!
I am a newcomer. This PR fixes issue #404 .
Parent tag's task count was not updated when adding/removing children tags to them.
The problem is solved by overriding the set_parent
method in the Tag
class and introducing a _get_ancestors
helper method.
Hi @gycsaba96, the big refactoring has finally landed (see the pinned 0.7 tracking issue for details)!
Could you check whether this is still needed with the current git master
version? It might have been fixed as part of the mega branch. Otherwise, you will need to git rebase
this PR.
Hi Jeff,
The problem is still present in the new version. However, I might need some time to find a proper solution using the new codebase. (My old solution relied on the base class of Tag, which had changed.)
Hi Jeff,
I have fixed the bug:
- Now, the ancestors of a tag are also considered when updating the task counts.
- After a drag-and-drop, these counts are recalculated.
Sorry for all the rebasing, this LGTM Merging, thanks!