Project

General

Profile

Actions

Bug #150

open
SV SV

[HR][Verify] C-01: Approving an already approved/rejected leave request double-deducts the balance

Bug #150: [HR][Verify] C-01: Approving an already approved/rejected leave request double-deducts the balance

Added by Sravan V S about 2 months ago. Updated 3 days ago.

Status:
Resolved
Priority:
Urgent
Assignee:
Target version:
-
Start date:
09/28/2026
Due date:
% Done:

0%

Estimated time:
Resolved By:

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 Actions #1

  • Assignee set to Sravan V S

S- Updated by SK - 12 days ago Actions #2

  • Assignee changed from Sravan V S to SK -

S- Updated by SK - 12 days ago Actions #3

  • 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 Actions #4

  • Assignee changed from Roshni Harish. to Sravan V S
Actions

Also available in: PDF Atom