fix(ST-1272): allow PLAN_READY → GRILLING re-grill transition
actions/ideas.ts already lists PLAN_READY in GRILL_TRIGGERABLE_FROM, but lib/idea-status.ts ALLOWED_TRANSITIONS was missing the PLAN_READY → GRILLING edge. As a result, clicking Grill on a PLAN_READY idea returned 422 "Status-transitie ongeldig" while the UI button was enabled. Mirrors the existing PLANNED → GRILLING re-grill behaviour. - lib/idea-status.ts: PLAN_READY allows GRILLING in addition to PLANNING/PLANNED - __tests__/lib/idea-status.test.ts: explicit assert for PLAN_READY → GRILLING and PLAN_READY added to the regrill loop covering every GRILL_TRIGGERABLE_FROM status Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
5cb3abbd3d
commit
e683c41df1
2 changed files with 4 additions and 3 deletions
|
|
@ -41,6 +41,7 @@ describe('canTransition', () => {
|
|||
it('allows re-grill from GRILLED and PLAN_READY-ish states', () => {
|
||||
expect(canTransition('GRILLED', 'GRILLING')).toBe(true)
|
||||
expect(canTransition('PLAN_FAILED', 'PLANNING')).toBe(true)
|
||||
expect(canTransition('PLAN_READY', 'GRILLING')).toBe(true)
|
||||
})
|
||||
|
||||
it('allows fail-side transitions', () => {
|
||||
|
|
@ -60,8 +61,8 @@ describe('canTransition', () => {
|
|||
})
|
||||
|
||||
it('canTransition to GRILLING from all statuses that allow re-grill', () => {
|
||||
// DRAFT, GRILLED, GRILL_FAILED, PLANNED are in GRILL_TRIGGERABLE_FROM and support the transition.
|
||||
const regrill = ['DRAFT', 'GRILLED', 'GRILL_FAILED', 'PLANNED'] as const
|
||||
// GRILL_TRIGGERABLE_FROM in actions/ideas.ts — alle statussen die re-grill ondersteunen.
|
||||
const regrill = ['DRAFT', 'GRILLED', 'GRILL_FAILED', 'PLAN_READY', 'PLANNED'] as const
|
||||
for (const status of regrill) {
|
||||
expect(canTransition(status, 'GRILLING')).toBe(true)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue