Judul : [BE] - [71239] - [Enhancement - Penambahan data Allow Minus pada Attendance Code]
Backlog : Link Backlog
Planning Generated by AI : Link hasil generate AI
Of course. Here is the refactored project plan based on your requirements, incorporating necessary details from the provided documents.
- [4h] Analyze and understand the existing codebase related to leave balance calculation and transaction processing.
- [4h] Review the product backlog requirements, focusing on the "Allow Minus" feature and its impact on existing customers.
- Database Enhancement & Migration
- [4h] Create new columns (
AllowMinus,AllowMinusLimit) in theAttendanceCodetable and apply the database migration. 2 - [4h] Create and execute a script to set default values (
Allow Minus= 'No',Limit= Empty) for all existingAttendanceCoderecords of type 'Annual Leave'. 3
- [4h] Create new columns (
- Refactor
getActiveLeaveBalanceByEmployeeIdLogic- [4h] Investigate and map the current implementation of
getActiveLeaveBalanceByEmployeeIdto understand its assumptions and data flow. - [4h] Develop the changes to handle cases where an employee has a negative leave balance ("debt").
- [4h] Investigate and map the current implementation of
- Implement Leave Debt Payment Logic
- [4h] Design and scaffold the service method that triggers when a new leave balance is allocated to an employee.
- [4h] Implement the logic to detect if an employee has an existing leave debt (identified by a null
MasterLeaveId) and calculate the result of the new allocation. - [4h] Implement the specific logic for when a new leave allocation partially pays off an existing debt (the new balance is less than the debt amount).
- [4h] Implement the logic for when a new leave allocation fully clears a debt and results in a new positive leave balance (the new balance is greater than the debt amount).
- Create new test cases for leave debt scenarios
- [4h] Set up test data and cover new scenarios in
getActiveLeaveBalanceByEmployeeIdwhere the balance can be negative. - [4h] Write unit tests for the partial debt payment scenario, ensuring the debt record is correctly updated.
- [4h] Write unit tests for the full debt payment scenario, ensuring the debt is cleared and no surplus is created.
- [4h] Write unit tests for the debt payment with surplus scenario, ensuring the debt is cleared and a new positive balance record is correctly created with the remainder.
- [4h] Set up test data and cover new scenarios in
- Verify that users can request leave with an insufficient balance up to the configured limit.
- [4h] Perform end-to-end testing via the user interface on Andal Connect (Request Leave) and Andal Kharisma (Create Transaction on Roster). 5
- [4h] Perform end-to-end testing using the Import Transaction Leave feature on the Roster, with import files containing cases that test the new limit rules. 6
@GunnerCat
Implement Leave Debt Payment Logic
MasterLeaveIdnullMasterLeaveIdnull, jika ada akan diisiAdd/Edit AttendanceCodeAPI endpoint to accept and persist the newAllowMinusandAllowMinusLimitfields. (Ref: )Get AttendanceCodeAPI endpoint returns the values of the newAllowMinusandAllowMinusLimitfields. (Ref: )LeaveBalanceValidationServicefor its validation checks. (Ref: )LeaveBalanceValidationService. (Ref: , )LeaveBalanceValidationServiceduring the import validation process (Checking Number 6). (Ref: , )LeaveBalanceValidationService, covering all scenarios: 'Yes', 'No', 'First Year', limited, unlimited, and edge cases for employee join dates. (Ref: )Add/Edit AttendanceCodeAPI endpoint to ensure the new fields are saved and retrieved correctly.