Repository navigation
Aditya Dhayapulay - Save timer task allocations atomically - #2472
Open
adit24dhaya wants to merge 5 commits into
Open
adit24dhaya wants to merge 5 commits into
adit24dhaya wants to merge 5 commits into
Conversation
Implement the Phase I Split One Timer Session Across Multiple Assigned Tasks request. Save allocations and hour counters with a durable receipt in one transaction so lost responses and concurrent retries cannot duplicate time. Preserve minute precision on later edits and deletions. Task: HGN Phase I Bugs and Needed Functionalities, Split One Timer Session Across Multiple Assigned Tasks Validation: 91 passing isolated transaction, timer, validation and time-entry regression tests; Babel build and changed-file lint.
CI resolves the newer memory-server driver, which hits MongoDB NODE-7832 under Jest. Supply its documented runtime adapter only in the isolated integration fixture while keeping the real driver and database. Local legacy-driver coverage remains unchanged. Validation: all 91 affected backend tests pass locally. CI will verify the newer driver path.
Extract transaction failure handling to keep cognitive complexity below the quality gate limit. Read the memory-server driver version with Jest’s module loader to satisfy the repository lint rule without disabling it.
adit24dhaya
marked this pull request as ready for review
November 5, 2026 22:31
Reject date-shaped objects before normalization so every saved split retains a valid work date. Keep the receipt error handling aligned with Sonar catch naming.
Keep transaction writes sequential, normalize session cleanup, and group task counter options while preserving exact split-entry accounting. Use explicit Node crypto imports. Addresses the five Sonar findings on #2472.
|
This branch has not been deployed
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
Save one timer session as separate entries for its assigned tasks. A five-hour session can become three hours on one task and two on another, with all entries and hour counters committed together.
Original task request
HGN Phase I Bugs and Needed Functionalities — Split One Timer Session Across Multiple Assigned Tasks
Original assignment: (PRIORITY HIGH) (FEATURE REQUEST) Aditya Dhayapulay: Split One Timer Session Across Multiple Assigned Tasks, estimated 15 hours.
Related PRS (if any):
Frontend: OneCommunityGlobal/HighestGoodNetworkApp#5784. Both task branches are required to test split saves. Merge the backend first; existing single-entry requests continue to work.
Main changes explained:
POST /TimeEntry/splitand receipt lookupGET /TimeEntry/split/:batchId.How to test:
Validation: 92 tests passed across the real disposable MongoDB transaction suite, validation tests, timer tests and three existing time-entry suites. Babel compiled all 794 source files. Changed production files have no ESLint errors (repository warnings remain).
Screenshots or videos of changes:
The frontend PR includes the allocation UI. Local Week 6 evidence contains light/dark mobile/desktop pictures, code pictures and a short compressed walkthrough. No media files are committed to this branch.
Note:
The browser checks use synthetic tasks and mocked API/stop acknowledgements; database atomicity/concurrency is tested separately against a disposable local replica set. No shared database writes, emails, merges or manual deployments were performed. The new receipt collection is created before the transaction, including on older replica sets.