AP1.6: Plan/Ist-Verknuepfung und Journey-Timeline.
Deploy Development / deploy (push) Failing after 37s
Test Suite / pytest-backend (push) Successful in 1m41s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / k6 /api/health Baseline (push) Successful in 18s
Test Suite / playwright-smoke (push) Successful in 13s
Deploy Development / deploy (push) Failing after 37s
Test Suite / pytest-backend (push) Successful in 1m41s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / k6 /api/health Baseline (push) Successful in 18s
Test Suite / playwright-smoke (push) Successful in 13s
Backlog, Actions, Projects und Tasks koennen Gates zugeordnet werden; Gate-Beitragsliste und chronologische Journey machen Plan/Ist nachvollziehbar. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
4ca0a2c460
commit
7e4936a2e4
29 files changed
+1072
-40
No files matched your search
@@ -27,6 +27,8 @@ class ActionUpdateRequest(BaseModel):
|
||||
clear_due_at: bool = False
|
||||
project_id: Optional[str] = None
|
||||
clear_project: bool = False
|
||||
roadmap_item_id: Optional[str] = None
|
||||
clear_roadmap_item: bool = False
|
||||
|
||||
|
||||
class TaskCreateRequest(BaseModel):
|
||||
@@ -129,6 +131,8 @@ def update_action(
|
||||
clear_due_at=body.clear_due_at,
|
||||
project_id=body.project_id,
|
||||
clear_project=body.clear_project,
|
||||
roadmap_item_id=body.roadmap_item_id,
|
||||
clear_roadmap_item=body.clear_roadmap_item,
|
||||
)
|
||||
except ValueError as exc:
|
||||
raise HTTPException(status_code=400, detail=str(exc)) from exc
|
||||
|
||||
@@ -18,6 +18,7 @@ class BacklogCreateRequest(BaseModel):
|
||||
description: str = ""
|
||||
status: Literal["new", "triaged", "accepted", "rejected"] = "new"
|
||||
priority: Literal["low", "normal", "high"] = "normal"
|
||||
roadmap_item_id: Optional[str] = None
|
||||
|
||||
|
||||
class BacklogUpdateRequest(BaseModel):
|
||||
@@ -25,6 +26,8 @@ class BacklogUpdateRequest(BaseModel):
|
||||
description: Optional[str] = None
|
||||
status: Optional[Literal["new", "triaged", "accepted", "rejected"]] = None
|
||||
priority: Optional[Literal["low", "normal", "high"]] = None
|
||||
roadmap_item_id: Optional[str] = None
|
||||
clear_roadmap_item: bool = False
|
||||
|
||||
|
||||
class BacklogConvertRequest(BaseModel):
|
||||
@@ -59,6 +62,8 @@ def update_backlog_item(
|
||||
description=body.description,
|
||||
status=body.status,
|
||||
priority=body.priority,
|
||||
roadmap_item_id=body.roadmap_item_id,
|
||||
clear_roadmap_item=body.clear_roadmap_item,
|
||||
)
|
||||
except ValueError as exc:
|
||||
raise HTTPException(status_code=400, detail=str(exc)) from exc
|
||||
|
||||
@@ -49,6 +49,7 @@ class ActionCreateRequest(BaseModel):
|
||||
priority: Literal["low", "normal", "high"] = "normal"
|
||||
due_at: Optional[str] = None
|
||||
project_id: Optional[str] = None
|
||||
roadmap_item_id: Optional[str] = None
|
||||
assigned_actor_ids: list[str] = Field(default_factory=list)
|
||||
|
||||
|
||||
@@ -65,6 +66,7 @@ class BacklogCreateRequest(BaseModel):
|
||||
description: str = ""
|
||||
status: Literal["new", "triaged", "accepted", "rejected"] = "new"
|
||||
priority: Literal["low", "normal", "high"] = "normal"
|
||||
roadmap_item_id: Optional[str] = None
|
||||
|
||||
|
||||
class MilestoneCreateRequest(BaseModel):
|
||||
@@ -251,6 +253,7 @@ def create_initiative_action(
|
||||
priority=body.priority,
|
||||
due_at=due_at,
|
||||
project_id=body.project_id,
|
||||
roadmap_item_id=body.roadmap_item_id,
|
||||
assigned_actor_ids=body.assigned_actor_ids,
|
||||
user_id=ctx.user_id,
|
||||
)
|
||||
@@ -330,6 +333,7 @@ def create_initiative_backlog_item(
|
||||
description=body.description,
|
||||
status=body.status,
|
||||
priority=body.priority,
|
||||
roadmap_item_id=body.roadmap_item_id,
|
||||
user_id=ctx.user_id,
|
||||
)
|
||||
except ValueError as exc:
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
"""Plan/Ist & Journey API — AP1.6."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from capabilities import require_capability
|
||||
from fastapi import APIRouter, Depends, HTTPException
|
||||
from services import plan_ist as plan_ist_service
|
||||
from tenant_context import TenantContext
|
||||
|
||||
initiative_router = APIRouter(prefix="/api/initiatives", tags=["journey"])
|
||||
roadmap_router = APIRouter(prefix="/api/roadmap-items", tags=["journey"])
|
||||
|
||||
|
||||
@initiative_router.get("/{initiative_id}/journey")
|
||||
def list_initiative_journey(
|
||||
initiative_id: str,
|
||||
ctx: TenantContext = Depends(require_capability("kairo.initiative.read")),
|
||||
):
|
||||
try:
|
||||
events = plan_ist_service.list_journey_events(
|
||||
tenant_id=ctx.tenant_id, initiative_id=initiative_id
|
||||
)
|
||||
except ValueError as exc:
|
||||
detail = str(exc)
|
||||
if detail == "Initiative nicht gefunden":
|
||||
raise HTTPException(status_code=404, detail=detail) from exc
|
||||
raise HTTPException(status_code=400, detail=detail) from exc
|
||||
return {"events": events}
|
||||
|
||||
|
||||
@roadmap_router.get("/{roadmap_item_id}/contributions")
|
||||
def list_gate_contributions(
|
||||
roadmap_item_id: str,
|
||||
ctx: TenantContext = Depends(require_capability("kairo.milestone.read")),
|
||||
):
|
||||
try:
|
||||
return plan_ist_service.list_gate_contributions(
|
||||
tenant_id=ctx.tenant_id, roadmap_item_id=roadmap_item_id
|
||||
)
|
||||
except ValueError as exc:
|
||||
detail = str(exc)
|
||||
if detail == "Gate nicht gefunden":
|
||||
raise HTTPException(status_code=404, detail=detail) from exc
|
||||
raise HTTPException(status_code=400, detail=detail) from exc
|
||||
Reference in new issue
Block a user