hrms icon indicating copy to clipboard operation
hrms copied to clipboard

Auto Attendance: Certain Shifts being skipped from marking attendance

Open AvinashReddy3108 opened this issue 1 year ago • 1 comments

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)

Screenshot 2023-11-27 at 12-30-15 General Shift Screenshot 2023-11-27 at 12-30-40 A Shift Screenshot 2023-11-27 at 12-30-46 B Shift Screenshot 2023-11-27 at 12-30-54 C Shift

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)

Screenshot 2023-11-27 at 12-34-04 Attendance

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

AvinashReddy3108 avatar Nov 27 '23 07:11 AvinashReddy3108

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)

Screenshot 2023-11-28 at 10-38-43 Attendance

AvinashReddy3108 avatar Nov 28 '23 05:11 AvinashReddy3108

Should be fixed with https://github.com/frappe/hrms/pull/1703

ruchamahabal avatar May 07 '24 17:05 ruchamahabal