Northeastern-Electric-Racing / Northeastern-Electric-Racing/FinishLine
[Change Requests] - Add a buffer comparison to work package activation
@glickgNU is already working on this.
Since Sep 15, 2026.
- Dominant language
- TypeScript
- Stars
- 36
- Forks
- 9
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 11
Description
Desired Changes
Context
When someone activates a work package, they pick a start date in the Activate modal. Right now any start date is accepted no matter how far it is from the date the work package was originally scheduled to start. We want to know, on the backend, whether the chosen start date is "close enough" (within a configurable number of days) to the scheduled date or not. This ticket just computes that yes/no answer; a later ticket uses it to send a Slack message. The number of allowed days lives on the organization as activationBufferDays.
Task
Write a small reusable helper that tells you whether two dates are within N days of each other, and call it inside the activation flow so the service knows whether this activation is "within buffer" or "outside buffer."
Acceptance Criteria
- A function isWithinBuffer(scheduledDate: Date, newDate: Date, bufferDays: number): boolean exists in the shared package and is exported.
- It compares the absolute difference in days, so a date that's 8 days before and 8 days after the scheduled date both count as outside a 7-day buffer.
- In ChangeRequestsService.createActivationChangeRequest, the service reads the work package's current startDate and the org's activationBufferDays, and computes a boolean for whether the submitted start date is outside the buffer.
- Nothing about how activation currently works changes
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.
Assessment
This issue has not been assessed yet.