home · contact · privacy
Display historical VersionedAttributes where it makes sense.
[plomtask] / plomtask / todos.py
index 712609aa8d81fdbe4f194a244ab6927224ee67ca..ffef677d29e652ad82d18e2d2c9f7b848e73a698 100644 (file)
@@ -182,6 +182,20 @@ class Todo(BaseModel[int], ConditionsRelations):
         """Shortcut to .process.title."""
         return self.process.title
 
+    @property
+    def title_then(self) -> str:
+        """Shortcut to .process.title.at(self.date)"""
+        title_then = self.process.title.at(self.date)
+        assert isinstance(title_then, str)
+        return title_then
+
+    @property
+    def effort_then(self) -> float:
+        """Shortcut to .process.effort.at(self.date)"""
+        effort_then = self.process.effort.at(self.date)
+        assert isinstance(effort_then, float)
+        return effort_then
+
     def adopt_from(self, todos: list[Todo]) -> bool:
         """As far as possible, fill unsatisfied dependencies from todos."""
         adopted = False