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
sbnrnya yang ini udah ada discussion baru lagi, karena ada permasalahan masterLeaveId, jadinya final decission yang di kasih dari lead SC, adalah apus aja masterLeaveId, jadi leaveBalance yang used, tidak akan memiliki masterLeaveId, utang maupun tidak
attendance code yang berhubungan dengan annualLeave tidak bisa di add, dan untuk edit nya, yang disesuaikan hanya mutation nya saja, yaitu ditambahkan allowMinus dan limit
dari aku nggak ada yang dirubah, mostly yang dirubah di value yang di return pada saat query getActiveLeaveBalance, supaya FE tau user punya debt berapa, dari situ bisa dipake di semua validation
kita nggak ada "LeaveBalanceValidationService"
unit test untuk returning debt pada getActiveLeaveBalance sudah dibuat