Skip to content

#4422 adding shared type - #4628

Merged
wavehassman merged 6 commits into
feature/triage-scorefrom
#4422-shared-type
Oct 24, 2026
Merged

wavehassman merged 6 commits into
feature/triage-scorefrom
#4422-shared-type

Conversation

@Steph375

@Steph375 Steph375 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Changes

  • Added triageScore to the shared Change Request type.

  • Updated the transformer to handle the new field.

  • Updated the associated tests to reflect these changes.

Checklist

It can be helpful to check the Checks and Files changed tabs.
Please review the contributor guide and reach out to your Tech Lead if anything is unclear.
Please request reviewers and ping on slack only after you've gone through this whole checklist.

  • All commits are tagged with the ticket number
  • No linting errors / newline at end of file warnings
  • All code follows repository-configured prettier formatting
  • No merge conflicts
  • All checks passing
  • Screenshots of UI changes (see Screenshots section)
  • Remove any non-applicable sections of this template
  • Assign the PR to yourself
  • No yarn.lock changes (unless dependencies have changed)
  • Request reviewers & ping on Slack
  • PR is linked to the ticket (fill in the closes line below)

Closes #4422

@Steph375
Steph375 marked this pull request as ready for review October 20, 2026 15:24
@Steph375
Steph375 requested a review from wavehassman October 21, 2026 18:38
category: { budget: number } | null;
activationChangeRequest: { startDate: Date } | null;
}): TriageScoreInput => {
const currentBudget = changeRequest.accountCode?.amount ?? changeRequest.category?.budget ?? undefined;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When a budget change request targets a category, reviewBudgetChangeRequest treats the category as the specific target and updates category.budget. Here the account code's amount is used whenever it's set, so a category change request is scored against the wrong budget. Change to: const currentBudget = changeRequest.category?.budget ?? changeRequest.accountCode?.amount ?? undefined;

activationChangeRequest: { startDate: Date } | null;
}): TriageScoreInput => {
const currentBudget = changeRequest.accountCode?.amount ?? changeRequest.category?.budget ?? undefined;
const proposedBudget = changeRequest.budgetChangeRequest?.proposedBudget;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

standard change requests that change the project budget get no budget score

budgetChange is only built from budgetChangeRequest, so a standard change request with projectProposedChanges.budget set changes a project's budget but scores 0 on budget

Add wbsProposedChanges.projectProposedChanges

activationChangeRequest: { startDate: Date } | null;
}): TriageScoreInput => {
const currentBudget = changeRequest.accountCode?.amount ?? changeRequest.category?.budget ?? undefined;
const proposedBudget = changeRequest.budgetChangeRequest?.proposedBudget;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

budget has no snapshot, so accepted change requests score 0 on budget

We need a snapshotBudget column filled in when the change request is created (from the account code or category for budget change requests, and from project.budget for standard change requests)

@wavehassman
wavehassman self-requested a review October 22, 2026 23:56
@Steph375 Steph375 self-assigned this Oct 23, 2026

@wavehassman wavehassman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice job!

@wavehassman
wavehassman merged commit 0eb7739 into feature/triage-score Oct 24, 2026
4 checks passed
@wavehassman
wavehassman deleted the #4422-shared-type branch October 24, 2026 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants