From 83f3269ce4718254a7902fdd296f77380e5568c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Csaba=20Gy=C3=B6rgyi?= Date: Wed, 15 May 2024 20:06:57 +0200 Subject: [PATCH] Inherit the parent's tags when creating a new subtask. If a parent is provided during task creation, all tags of the parent are added to the newly created task. Fixes GitHub issue #1078 --- GTG/core/tasks.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/GTG/core/tasks.py b/GTG/core/tasks.py index 9fcf1ef49..a6eecfce5 100644 --- a/GTG/core/tasks.py +++ b/GTG/core/tasks.py @@ -763,6 +763,11 @@ def new(self, title: str = None, parent: UUID = None) -> Task: self.add(task, parent) + # add the tags of the parent + if parent is not None: + for tag in self.lookup[parent].tags: + task.add_tag(tag) + return task