feat(ST-cmovhveef): add PLANNED to GRILL_TRIGGERABLE_FROM and PLANNED→GRILLING transition

- GRILL_TRIGGERABLE_FROM now includes 'PLANNED' in actions/ideas.ts
- ALLOWED_TRANSITIONS PLANNED entry extended with 'GRILLING' in lib/idea-status.ts
- Updated canTransition test to reflect the new re-grill-from-PLANNED behavior
This commit is contained in:
Scrum4Me Agent 2026-05-07 15:06:51 +02:00
parent 2d27c41d38
commit b6447f27f1
3 changed files with 4 additions and 4 deletions

View file

@ -53,9 +53,9 @@ describe('canTransition', () => {
expect(canTransition('PLAN_FAILED', 'GRILLED')).toBe(true)
})
it('only allows PLANNED → PLAN_READY (relink path)', () => {
it('allows PLANNED → PLAN_READY (relink) and PLANNED → GRILLING (re-grill)', () => {
expect(canTransition('PLANNED', 'PLAN_READY')).toBe(true)
expect(canTransition('PLANNED', 'GRILLING')).toBe(false)
expect(canTransition('PLANNED', 'GRILLING')).toBe(true)
expect(canTransition('PLANNED', 'DRAFT')).toBe(false)
})

View file

@ -338,7 +338,7 @@ export async function downloadIdeaMdAction(
// ---------------------------------------------------------------------------
// Job-triggers (Grill Me / Make Plan / Cancel)
const GRILL_TRIGGERABLE_FROM: IdeaStatus[] = ['DRAFT', 'GRILLED', 'GRILL_FAILED', 'PLAN_READY']
const GRILL_TRIGGERABLE_FROM: IdeaStatus[] = ['DRAFT', 'GRILLED', 'GRILL_FAILED', 'PLAN_READY', 'PLANNED']
const MAKE_PLAN_TRIGGERABLE_FROM: IdeaStatus[] = ['GRILLED', 'PLAN_FAILED', 'PLAN_READY']
export async function startGrillJobAction(id: string): Promise<ActionResult<{ job_id: string }>> {

View file

@ -54,7 +54,7 @@ const ALLOWED_TRANSITIONS: Record<IdeaStatus, ReadonlyArray<IdeaStatus>> = {
PLANNING: ['PLAN_READY', 'PLAN_FAILED'],
PLAN_FAILED: ['PLANNING', 'GRILLED'],
PLAN_READY: ['PLANNING', 'PLANNED'],
PLANNED: ['PLAN_READY'], // alleen via relinkIdeaPlanAction (PBI deleted)
PLANNED: ['PLAN_READY', 'GRILLING'], // PLAN_READY via relinkIdeaPlanAction; GRILLING via startGrillJobAction
}
export function canTransition(from: IdeaStatus, to: IdeaStatus): boolean {