EAMakeSingleCheckInCheckOutIfNeeded
This document was generated using Claude.ai
Overview
Converts incomplete attendance records from check-in only to check-out only when the recorded time falls within a specified range. Useful for correcting attendance data where employees forgot to check in but remembered to check out, typically for afternoon or evening shifts.
When This Action Runs
Manual execution during attendance data cleanup when you identify patterns of missing check-ins with only check-out times recorded. Commonly used for employees who start work in the afternoon/evening and the system recorded their first punch as check-in instead of check-out.
How It Works
- Processes attendance lines - Iterates through all time attendance lines in the document
- Identifies incomplete records - Finds lines with check-in data but no check-out data
- Validates time range - Checks if the check-in time falls within the specified time range
- Converts to check-out - Moves check-in date/time to check-out fields
- Clears check-in data - Sets check-in date to null and time to empty
- Preserves other data - All other attendance line information remains unchanged
Parameters
Parameter 1: Range Start (Required) - Start time of the range (e.g., "14:00" for 2:00 PM)
Parameter 2: Range End (Required) - End time of the range (e.g., "23:59" for 11:59 PM)
Database Tables Affected
- TimeAttendanceLine - Updates from/to date and time fields for matching records
Important Warnings
⚠️ Data Transformation Warning
- Permanently converts check-in records to check-out records
- Original check-in data is moved, not copied
- Cannot be undone without backup data
⚠️ Time Range Logic
- Only processes records where check-in time is within the specified range
- Time comparison ignores dates - only hours and minutes matter
- Range can span midnight (e.g., "22:00" to "02:00")
⚠️ Incomplete Record Requirements
- Only affects lines that have:
- Check-in date (fromDate) populated
- Check-in time (fromTime) populated
- No check-out date (toDate is null)
- Complete attendance records are never modified
⚠️ Business Scenario Usage
- Designed for specific scenarios like evening shift corrections
- Assumes employee intended to record check-out, not check-in
- May not be appropriate for all attendance patterns
⚠️ Time Format Requirements
- Times must be in 24-hour format (HH:MM)
- Invalid time formats may cause parsing errors
- No date component should be included in parameters
⚠️ Data Loss Considerations
- Check-in information is completely removed after conversion
- No audit trail of the conversion is maintained
- Consider backing up attendance data before running
⚠️ Shift Pattern Assumptions
- Best suited for predictable shift patterns
- Afternoon/evening shifts where check-ins are unlikely
- Not recommended for flexible or rotating shifts
⚠️ Validation Requirements
- No validation that converted data makes business sense
- Could create illogical attendance records if misused
- Review converted records for accuracy
⚠️ Common Use Cases
- Evening shift employees (e.g., 14:00 - 22:00)
- Night shift workers (e.g., 22:00 - 06:00)
- Part-time afternoon workers
⚠️ Impact on Calculations
- Converted records show only check-out times
- May affect attendance calculations expecting paired records
- Consider impact on overtime and absence calculations
Module: hr
Full Class Name: com.namasoft.modules.humanresource.utils.actions.EAMakeSingleCheckInCheckOutIfNeeded