refactor: update milestone/task status enums to new state machine values
Milestone: open/freeze/undergoing/completed/closed (was open/pending/deferred/progressing/closed) Task: open/pending/undergoing/completed/closed (was open/pending/progressing/closed) - Add MilestoneStatusEnum to schemas with typed validation - Add started_at field to Milestone model - Update all router/CLI references from progressing->undergoing - Add completed status handling in task transition logic
This commit is contained in:
@@ -6,9 +6,9 @@ import enum
|
||||
|
||||
class MilestoneStatus(str, enum.Enum):
|
||||
OPEN = "open"
|
||||
PENDING = "pending"
|
||||
DEFERRED = "deferred"
|
||||
PROGRESSING = "progressing"
|
||||
FREEZE = "freeze"
|
||||
UNDERGOING = "undergoing"
|
||||
COMPLETED = "completed"
|
||||
CLOSED = "closed"
|
||||
|
||||
class Milestone(Base):
|
||||
@@ -25,6 +25,7 @@ class Milestone(Base):
|
||||
depend_on_tasks = Column(Text, nullable=True)
|
||||
project_id = Column(Integer, ForeignKey("projects.id"), nullable=False)
|
||||
created_by_id = Column(Integer, ForeignKey("users.id"), nullable=True)
|
||||
started_at = Column(DateTime(timezone=True), nullable=True)
|
||||
created_at = Column(DateTime(timezone=True), server_default=func.now())
|
||||
updated_at = Column(DateTime(timezone=True), onupdate=func.now())
|
||||
|
||||
|
||||
@@ -21,7 +21,8 @@ class TaskType(str, enum.Enum):
|
||||
class TaskStatus(str, enum.Enum):
|
||||
OPEN = "open"
|
||||
PENDING = "pending"
|
||||
PROGRESSING = "progressing"
|
||||
UNDERGOING = "undergoing"
|
||||
COMPLETED = "completed"
|
||||
CLOSED = "closed"
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,8 @@ import enum
|
||||
class TaskStatus(str, enum.Enum):
|
||||
OPEN = "open"
|
||||
PENDING = "pending"
|
||||
PROGRESSING = "progressing"
|
||||
UNDERGOING = "undergoing"
|
||||
COMPLETED = "completed"
|
||||
CLOSED = "closed"
|
||||
|
||||
class TaskPriority(str, enum.Enum):
|
||||
|
||||
Reference in New Issue
Block a user