Bug #150
open[HR][Verify] C-01: Approving an already approved/rejected leave request double-deducts the balance
0%
Description
LeaveRequestService.ApproveAsync calls _balanceService.DeductAsync and saves it BEFORE LeaveRequest.Approve()'s state guard runs. Confirmed in code (LeaveRequestService.cs:364-373). Reproduce on the test box: approve a request twice (or approve then reject then approve) and watch the balance. Part of #140.
SV Updated by Sravan V S about 2 months ago
- Assignee set to Sravan V S
S- Updated by SK - 12 days ago
- Status changed from New to Resolved
- Assignee changed from SK - to Roshni Harish.
- Resolved By set to SK -
Already fixed - confirmed live in current dev. This is the exact bug #140 fixed earlier today (see #140's own notes: "guard-before-deduct in one commit"). Verified directly in the merged code: LeaveRequestService's Approve/ManagerApprove/Reject/RevokeApproval paths each wrap their balance mutation and status-save in a single Database.BeginTransactionAsync/commit - the old window where a deduction could commit separately from (or before) the approval-status guard no longer exists.
Marking resolved on the code side. The ticket's own repro steps ("approve a request twice... watch the balance") are a live/deployed-box check - worth a QA pass on the test box once this is deployed, assigning to Roshni for that.
RH Updated by Roshni Harish. 3 days ago
- Assignee changed from Roshni Harish. to Sravan V S