hrms
hrms copied to clipboard
Auto Attendance: Certain Shifts being skipped from marking attendance
Information about bug
Prerequisites:
- Holiday List (use Data Import Tool): Holiday List.csv
- Sample Employee (use Data Import Tool): Sample_Employee.csv (PS: Create the Branch and Designation manually)
- Shift Assignments (use Data Import Tool): Sample Shift Assignment.csv
- Employee Check-ins (use Data Import Tool):
None
- Shift Types (Screenshots Below, as Data Import not available for this)
Expected Output:
Since there are no Employee Checkins, the Attendance should be marked Absent for all of the days of the month (October 2023)
Actual Output
For the given Employee, the Attendance is marked only for the days with A Shift (B Shift, C Shift are skipped, see screenshot below)
Module
HR
Version
Frappe Framework: v15.2.1 (version-15) ERPNext: v15.3.0 (version-15) Frappe HR: v15.4.0 (version-15)
This issue also affects the version-14
stack, tested with the version below
Frappe Framework: v14.56.1 (version-14) ERPNext: v14.49.0 (version-14) Frappe HR: v14.18.0 (version-14)
Installation method
manual install
Relevant log output / Stack trace / Full Error Message.
No response
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
On further research around the issue, I have found that removing the "and" part from this line shown below..
https://github.com/frappe/hrms/blob/7c36b88f2721aac6133103bd277357e053635b0b/hrms/hr/doctype/shift_type/shift_type.py#L214
i.e. the line would become if prev_shift:
solves my issue.
Here's a screenshot of the result I was expecting (this is on the version-14
stack)
Frappe Framework: v14.56.1 (version-14)
ERPNext: v14.49.0 (version-14)
Frappe HR: v14.18.0 (version-14)
Should be fixed with https://github.com/frappe/hrms/pull/1703