Northeastern-Electric-Racing / Northeastern-Electric-Racing/FinishLine
[Change Request] - Write a computeTriageScore function
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 36
- Forks
- 9
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 11
Description
Description
Context
Change requests should be rankable by importance, so the important ones get reviewed first instead of getting stuck behind trivial ones. We want a single, self-contained function that takes a few numbers about a CR and returns a score. It has no database access, just math, so it's easy to test. Something else will call it and store the result.
Task
Write and test a function computeTriageScore(input): number.
Acceptance Criteria
- Lives in its own file (e.g., utils/triage-score.utils.ts), exported, no DB calls.
- Takes a typed input object with: CR type; proposed budget magnitude (budget CRs only); blocking count (how many WPs this WP blocks); days until start; days until end; timeline-change amount + direction (a change that pushes the date later scores higher than one that pulls it earlier).
- All weights are named constants at the top of the file with comments, so they're easy to tune later.
- Higher = more urgent. A more overdue deadline scores higher than one further out.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by checking the existing utility and test conventions, then use the proposed utils/triage-score.utils.ts location as the entry point. Define the typed input and named, commented weights from the acceptance criteria, and add tests for CR types, budget and blocking counts, deadlines, and timeline direction. Done means the exported function is self-contained, has no database calls, and its tests verify that higher urgency produces higher scores.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100