From b6447f27f123b4bc0eacadd30557cbb01f42b19a Mon Sep 17 00:00:00 2001 From: Scrum4Me Agent <30029041+madhura68@users.noreply.github.com> Date: Thu, 7 May 2026 15:06:51 +0200 Subject: [PATCH] =?UTF-8?q?feat(ST-cmovhveef):=20add=20PLANNED=20to=20GRIL?= =?UTF-8?q?L=5FTRIGGERABLE=5FFROM=20and=20PLANNED=E2=86=92GRILLING=20trans?= =?UTF-8?q?ition?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- __tests__/lib/idea-status.test.ts | 4 ++-- actions/ideas.ts | 2 +- lib/idea-status.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/__tests__/lib/idea-status.test.ts b/__tests__/lib/idea-status.test.ts index 0dfc3dc..7adfbd4 100644 --- a/__tests__/lib/idea-status.test.ts +++ b/__tests__/lib/idea-status.test.ts @@ -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) }) diff --git a/actions/ideas.ts b/actions/ideas.ts index dbfa806..1cdab96 100644 --- a/actions/ideas.ts +++ b/actions/ideas.ts @@ -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> { diff --git a/lib/idea-status.ts b/lib/idea-status.ts index c972a38..1cc94b2 100644 --- a/lib/idea-status.ts +++ b/lib/idea-status.ts @@ -54,7 +54,7 @@ const ALLOWED_TRANSITIONS: Record> = { 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 {