AP2.2d: Sprint-Planung, Abschluss und Product-Fallback.
Deploy Development / deploy (push) Successful in 48s
Test Suite / pytest-backend (push) Successful in 2m56s
Test Suite / lint-backend (push) Successful in 2s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / k6 /api/health Baseline (push) Successful in 18s
Test Suite / playwright-smoke (push) Has been cancelled
Deploy Development / deploy (push) Successful in 48s
Test Suite / pytest-backend (push) Successful in 2m56s
Test Suite / lint-backend (push) Successful in 2s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / k6 /api/health Baseline (push) Successful in 18s
Test Suite / playwright-smoke (push) Has been cancelled
Backlog committet in gewaehlten Sprint, Sprint complete-Endpoint, continuous_product-Ansicht ohne aktiven Sprint. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
09826d146e
commit
f6aba94864
11 files changed
+422
-17
No files matched your search
@@ -176,6 +176,52 @@ def activate_work_cycle(
|
||||
return result
|
||||
|
||||
|
||||
def complete_work_cycle(
|
||||
*,
|
||||
tenant_id: str,
|
||||
initiative_id: str,
|
||||
work_cycle_id: str,
|
||||
user_id: Optional[str] = None,
|
||||
) -> dict[str, Any]:
|
||||
validate_work_cycle_in_initiative(
|
||||
tenant_id=tenant_id,
|
||||
initiative_id=initiative_id,
|
||||
work_cycle_id=work_cycle_id,
|
||||
)
|
||||
if not get_initiative(tenant_id=tenant_id, initiative_id=initiative_id):
|
||||
raise ValueError("Initiative nicht gefunden")
|
||||
|
||||
conn = get_connection()
|
||||
try:
|
||||
with conn.cursor(cursor_factory=RealDictCursor) as cur:
|
||||
cur.execute(
|
||||
"""
|
||||
UPDATE roadmap_items
|
||||
SET status = 'reached', updated_at = NOW()
|
||||
WHERE id = %s AND tenant_id = %s
|
||||
AND item_type = %s
|
||||
AND status IN ('planned', 'active', 'at_risk')
|
||||
RETURNING id, title, goal_description, status, target_date, sort_order, item_type
|
||||
""",
|
||||
(work_cycle_id, tenant_id, WORK_CYCLE_TYPE),
|
||||
)
|
||||
row = cur.fetchone()
|
||||
if not row:
|
||||
raise ValueError("Sprint nicht gefunden oder bereits abgeschlossen")
|
||||
conn.commit()
|
||||
finally:
|
||||
conn.close()
|
||||
|
||||
result = _serialize_cycle({**dict(row), "initiative_id": initiative_id})
|
||||
log_audit(
|
||||
"work_cycle.completed",
|
||||
user_id=user_id,
|
||||
tenant_id=tenant_id,
|
||||
details={"work_cycle_id": work_cycle_id, "initiative_id": initiative_id},
|
||||
)
|
||||
return result
|
||||
|
||||
|
||||
def count_actions_in_work_cycle(
|
||||
*, tenant_id: str, initiative_id: str, work_cycle_id: str
|
||||
) -> int:
|
||||
|
||||
Reference in new issue
Block a user