I would like to give the background of Compensatory leave request (CLR) first.
When can an employee successfully raise a CLR?
- The date of application is designated holiday in the holiday list (either at employee level or shift level) AND
- The date of application has an Attendance record in Attendance doctype.
How are Attendance records getting generated in Auto attendance feature? (that gets triggered hourly or through the button on the shift’s screen)
Ans : The records are based on the Employee Checkins. But the problem is that even if an employee checks in on a holiday, the attendance record does not get generated by Auto attendance feature. (Exact code @ get_employee_shift in shift assignment.py) And without the attendance record, the Compensatory Leave Request simply fails.
Solution : Ignore the holiday list and generate attendance records for all checkins.
I can contribute the fix but would like to know if the solution could be any better.