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:
parent
2d27c41d38
commit
b6447f27f1
3 changed files with 4 additions and 4 deletions
|
|
@ -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)
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -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 }>> {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue