fix(steering): Gate-Horizont ignoriert aktive work_cycles
Some checks failed
Deploy Development / deploy (push) Successful in 47s
Test Suite / pytest-backend (push) Successful in 3m37s
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 19s
Test Suite / playwright-smoke (push) Has been cancelled
Some checks failed
Deploy Development / deploy (push) Successful in 47s
Test Suite / pytest-backend (push) Successful in 3m37s
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 19s
Test Suite / playwright-smoke (push) Has been cancelled
first_active_gate_id schloss Sprint-Zeitboxen mit status=active ein und leerte Agile-Next bei Gate-Schnittmenge. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
0443b734c1
commit
606dd960b8
|
|
@ -170,7 +170,7 @@ def blocked_execution_action_ids(
|
||||||
|
|
||||||
|
|
||||||
def first_active_gate_id(ctx: TenantContext, initiative_id: str) -> str | None:
|
def first_active_gate_id(ctx: TenantContext, initiative_id: str) -> str | None:
|
||||||
"""First active roadmap item for initiative scope (Gate-Horizont)."""
|
"""First active plan gate (milestone/review/maturity) — not work_cycle."""
|
||||||
from db import get_connection
|
from db import get_connection
|
||||||
from psycopg2.extras import RealDictCursor
|
from psycopg2.extras import RealDictCursor
|
||||||
|
|
||||||
|
|
@ -184,6 +184,7 @@ def first_active_gate_id(ctx: TenantContext, initiative_id: str) -> str | None:
|
||||||
JOIN roadmaps r ON r.id = ri.roadmap_id AND r.tenant_id = ri.tenant_id
|
JOIN roadmaps r ON r.id = ri.roadmap_id AND r.tenant_id = ri.tenant_id
|
||||||
WHERE ri.tenant_id = %s AND r.initiative_id = %s
|
WHERE ri.tenant_id = %s AND r.initiative_id = %s
|
||||||
AND ri.status = 'active'
|
AND ri.status = 'active'
|
||||||
|
AND ri.item_type != 'work_cycle'
|
||||||
ORDER BY ri.sort_order ASC NULLS LAST,
|
ORDER BY ri.sort_order ASC NULLS LAST,
|
||||||
ri.target_date ASC NULLS LAST,
|
ri.target_date ASC NULLS LAST,
|
||||||
ri.updated_at DESC
|
ri.updated_at DESC
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user