Skip to content

Instantly share code, notes, and snippets.

@GunnerCat
Last active August 12, 2025 03:40
Show Gist options
  • Select an option

  • Save GunnerCat/f71d7d90ff5027344f385dd40822a457 to your computer and use it in GitHub Desktop.

Select an option

Save GunnerCat/f71d7d90ff5027344f385dd40822a457 to your computer and use it in GitHub Desktop.
BIMONTHLY 2 PLAN.md

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.

Planning [8 hours]

  • [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.

Development [32 hours]

  • Database Enhancement & Migration
    • [4h] Create new columns (AllowMinus, AllowMinusLimit) in the AttendanceCode table and apply the database migration. 2
    • [4h] Create and execute a script to set default values (Allow Minus = 'No', Limit = Empty) for all existing AttendanceCode records of type 'Annual Leave'. 3
  • Refactor getActiveLeaveBalanceByEmployeeId Logic
    • [4h] Investigate and map the current implementation of getActiveLeaveBalanceByEmployeeId to understand its assumptions and data flow.
    • [4h] Develop the changes to handle cases where an employee has a negative leave balance ("debt").
  • 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).

UnitTest [16 hours]

  • Create new test cases for leave debt scenarios
    • [4h] Set up test data and cover new scenarios in getActiveLeaveBalanceByEmployeeId where 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.

Acceptance Criteria (QA & Testing) [8 hours]

  • 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
@jeje-andal
Copy link

@GunnerCat
sebaiknya poin berikut ditambahkan detailnya, perubahan apa saja yg perlu dilakukan
agar lebih mudah dipahami kenapa butuh 4 jam untuk masing2 poin
[4] Removing LiveDate
[4] Replacing LiveDate With Today/DPT or SRD
[4] Changing Update Trigger, removing Cron trigger
[4] implementing "Today" to the update Detail

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment