diff --git a/terka/domain/entities/composite.py b/terka/domain/entities/composite.py index 65d85bb..5109a0b 100644 --- a/terka/domain/entities/composite.py +++ b/terka/domain/entities/composite.py @@ -37,6 +37,12 @@ def __init__(self, self.status = status self.is_completed = False + @property + def project_name(self) -> str: + if project := self.project_: + return project.name + return "" + @property def backlog_tasks(self) -> list[Task]: tasks = [] diff --git a/terka/domain/entities/project.py b/terka/domain/entities/project.py index 37b42d5..02374f8 100644 --- a/terka/domain/entities/project.py +++ b/terka/domain/entities/project.py @@ -27,6 +27,12 @@ def __init__(self, self.status = status self.workspace = workspace + @property + def workspace_name(self) -> str: + if workspace := self.workspace_: + return workspace.name + return "" + def _validate_status(self, status): if status not in [ s.name for s in ProjectStatus if s.name != "DELETED"