Northeastern-Electric-Racing / Northeastern-Electric-Racing/FinishLine

[Change Request] - Write a computeTriageScore function

Open
#4,420 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.