Nirali: core team members additional hours carryover#2216
Open
Nirali164 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Implements the fix for Core Team members’ missed hours carryover logic when blue squares exceed five. Previously, missed hours were carried over to the next week, but the additional hours associated with having more than five blue squares were not consistently included in the following week’s required commitment. This update ensures Core Team members receive additional required hours based on their blue square count (e.g., 6th blue square = +1 hour, 7th blue square = +2 hours), and those hours are carried into subsequent weeks correctly. Email messaging and infringement descriptions were also updated to accurately reflect the required weekly commitment and owed hours.
Implements: PRIORITY MEDIUM - Yubo/Jae: Make Core Team members’ additional hours process properly (Fixes #1141 & #1281 → PR #1612)
#Related PRs (if any):
#Frontend PR: N/A
Backend PR: This PR
Main changes explained:
Updated applyMissedHourForCoreTeam() to include additional Core Team hours when blue squares exceed five.
Added infringement adjustment logic to calculate extra required hours based on blue square count.
Updated assignBlueSquareForTimeNotMet() to include carried-over Core Team additional hours in weekly commitment calculations.
Fixed weekly required hour calculations to include:
committed weekly hours
previous missed hours
additional Core Team hours (after 5 blue squares)
Updated infringement descriptions to reflect accurate completed vs required hours for Core Team members.
Updated getInfringementEmailBody() to correctly display required hours and prevent double-counting of additional Core Team hours.
Added batch processing (bulkWrite) for updating missed hours to reduce database operations and improve efficiency.
How to test:
Check out the current branch:
git checkout nirali-core-team-members-hours
npm install
npm start
Note:
The fix ensures Core Team-specific additional hour rules are consistently applied across missed hour carryover, weekly commitment validation, infringement descriptions, and blue square email calculations.