From efad79897fa2c13abd00470c9fc03ee8dfa3a567 Mon Sep 17 00:00:00 2001 From: Diego Garcia Gangl Date: Tue, 23 Jul 2024 11:44:19 -0300 Subject: [PATCH] Look for parent in due date binding If the task's parent has a due date then we should show sub-tasks as having that due date. fix #1072 --- GTG/core/tasks.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/GTG/core/tasks.py b/GTG/core/tasks.py index 0ab9cee8c..60fad3d7c 100644 --- a/GTG/core/tasks.py +++ b/GTG/core/tasks.py @@ -563,7 +563,10 @@ def is_recurring(self) -> bool: @GObject.Property(type=bool, default=False) def has_date_due(self) -> bool: - return self._has_date_due + if not self._has_date_due and self.parent: + return self.parent._has_date_due + else: + return self._has_date_due @has_date_due.setter @@ -593,7 +596,10 @@ def set_date_start_str(self, value) -> None: @GObject.Property(type=str) def date_due_str(self) -> str: - return self._date_due_str + if not self._date_due_str and self.parent: + return self.parent._date_due_str + else: + return self._date_due_str @date_due_str.setter