Simplify routing to award assignment, seed all CSV entries, fix category mapping
All checks were successful
Build and Push Docker Image / build (push) Successful in 8m3s
All checks were successful
Build and Push Docker Image / build (push) Successful in 8m3s
- Remove RoutingRule model and routing engine (replaced by direct award assignment) - Simplify RoutingMode enum: PARALLEL/POST_MAIN → SHARED, keep EXCLUSIVE - Remove routing router, routing-rules-editor, and related tests - Update pipeline, award, and notification code to remove routing references - Seed: include all CSV entries (no filtering/dedup), AI screening handles duplicates - Seed: fix non-breaking space (U+00A0) bug in category/issue mapping - Stage filtering: add duplicate detection that flags projects for admin review Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -257,35 +257,6 @@ export async function createTestEvaluationForm(
|
||||
})
|
||||
}
|
||||
|
||||
// ─── Routing Rule Factory ──────────────────────────────────────────────────
|
||||
|
||||
export async function createTestRoutingRule(
|
||||
pipelineId: string,
|
||||
destinationTrackId: string,
|
||||
overrides: Partial<{
|
||||
name: string
|
||||
priority: number
|
||||
predicateJson: Record<string, unknown>
|
||||
sourceTrackId: string
|
||||
destinationStageId: string
|
||||
isActive: boolean
|
||||
}> = {},
|
||||
) {
|
||||
const id = uid('rule')
|
||||
return prisma.routingRule.create({
|
||||
data: {
|
||||
id,
|
||||
pipelineId,
|
||||
name: overrides.name ?? `Rule ${id}`,
|
||||
destinationTrackId,
|
||||
sourceTrackId: overrides.sourceTrackId ?? null,
|
||||
destinationStageId: overrides.destinationStageId ?? null,
|
||||
predicateJson: (overrides.predicateJson ?? { field: 'project.status', operator: 'eq', value: 'SUBMITTED' }) as any,
|
||||
priority: overrides.priority ?? 0,
|
||||
isActive: overrides.isActive ?? true,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
// ─── Filtering Rule Factory ────────────────────────────────────────────────
|
||||
|
||||
@@ -397,7 +368,6 @@ export async function cleanupTestData(programId: string, userIds: string[] = [])
|
||||
await prisma.evaluationDiscussion.deleteMany({ where: { stage: { track: { pipeline: { programId } } } } })
|
||||
await prisma.projectStageState.deleteMany({ where: { track: { pipeline: { programId } } } })
|
||||
await prisma.stageTransition.deleteMany({ where: { fromStage: { track: { pipeline: { programId } } } } })
|
||||
await prisma.routingRule.deleteMany({ where: { pipeline: { programId } } })
|
||||
await prisma.awardEligibility.deleteMany({ where: { award: { program: { id: programId } } } })
|
||||
await prisma.awardVote.deleteMany({ where: { award: { program: { id: programId } } } })
|
||||
await prisma.awardJuror.deleteMany({ where: { award: { program: { id: programId } } } })
|
||||
|
||||
Reference in New Issue
Block a user