AP1.4c: Gate-Checkliste statt Freitext-DoD.
Deploy Development / deploy (push) Successful in 47s
Test Suite / pytest-backend (push) Successful in 2m13s
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) Successful in 12s
Deploy Development / deploy (push) Successful in 47s
Test Suite / pytest-backend (push) Successful in 2m13s
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) Successful in 12s
Kriterien-Fortschritt in der Gate-Liste, Modal-UX fuer Checklisten und optionales Erst-Kriterium beim Anlegen. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
dbe6f4f684
commit
bd64340ca1
10 files changed
+509
-198
No files matched your search
@@ -233,6 +233,7 @@ def create_roadmap_item(
|
||||
sequencing_mode: SequencingMode = "sequential",
|
||||
target_date: Optional[date] = None,
|
||||
sort_order: int = 0,
|
||||
initial_criterion_title: Optional[str] = None,
|
||||
user_id: Optional[str] = None,
|
||||
) -> dict[str, Any]:
|
||||
title = title.strip()
|
||||
@@ -280,6 +281,8 @@ def create_roadmap_item(
|
||||
cur,
|
||||
tenant_id=tenant_id,
|
||||
roadmap_item_id=row["id"],
|
||||
title=(initial_criterion_title or "Gate allgemein").strip()
|
||||
or "Gate allgemein",
|
||||
description=goal_description or "",
|
||||
)
|
||||
_sync_milestone_compat_row(
|
||||
|
||||
@@ -562,6 +562,46 @@ def defer_criterion(
|
||||
)
|
||||
|
||||
|
||||
def criteria_progress_for_initiative(
|
||||
*, tenant_id: str, initiative_id: str
|
||||
) -> dict[str, dict[str, int]]:
|
||||
from services.initiatives import get_initiative
|
||||
|
||||
if not get_initiative(tenant_id=tenant_id, initiative_id=initiative_id):
|
||||
raise ValueError("Initiative nicht gefunden")
|
||||
|
||||
conn = get_connection()
|
||||
try:
|
||||
with conn.cursor() as cur:
|
||||
cur.execute(
|
||||
"""
|
||||
SELECT
|
||||
ri.id::text,
|
||||
COUNT(c.id) AS total,
|
||||
COUNT(c.id) FILTER (
|
||||
WHERE c.status IN ('satisfied', 'waived', 'deferred')
|
||||
) AS closed
|
||||
FROM roadmap_items ri
|
||||
JOIN roadmaps r ON r.id = ri.roadmap_id AND r.tenant_id = ri.tenant_id
|
||||
LEFT JOIN roadmap_item_criteria c
|
||||
ON c.roadmap_item_id = ri.id AND c.tenant_id = ri.tenant_id
|
||||
WHERE ri.tenant_id = %s AND r.initiative_id = %s
|
||||
GROUP BY ri.id
|
||||
""",
|
||||
(tenant_id, initiative_id),
|
||||
)
|
||||
return {
|
||||
row[0]: {
|
||||
"total": row[1],
|
||||
"closed": row[2],
|
||||
"open": row[1] - row[2],
|
||||
}
|
||||
for row in cur.fetchall()
|
||||
}
|
||||
finally:
|
||||
conn.close()
|
||||
|
||||
|
||||
def criteria_progress(*, tenant_id: str, item_id: str) -> dict[str, int]:
|
||||
conn = get_connection()
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user