Repository navigation
Conversation
…t who never attended Employees with no shift (typically salaried managers who don't clock in) were listed on every view of the monthly summary and its export as absent on every working day. The summary now lists the same people the dashboards expect in (expected_employee_ids, horilla#1280): employees with a shift, plus anyone without one who has attendance in the range. Someone picked by name is still listed.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Employees with no shift (typically salaried staff who never clock in) are listed on every view of the Monthly Attendance Summary (list, day-wise grid and summary dashboard) and in its XLSX export, absent on every working day. On a company with a few such people, the absences, attendance percentages and "low attendance" findings are dominated by people who were never expected in.
Fix
The summary now lists the same people the dashboards expect in, using
expected_employee_idsfrom #1280: employees with a shift, plus anyone without one who has attendance in the chosen range (so someone without a shift who does clock in still appears, with their real days).Tests
attendance/tests/test_summary_no_shift_employees.py(3 tests): someone without a shift who never attended is left out of the list, day-wise view and export; one who attended is listed; one picked by name is listed. They fail on the current code and pass with the fix.test_daily_view.pyandtest_summary_group_by.pynow give their employee a shift: those tests render an employee with no attendance and expect to see them.Checklist
dev/v2.0, not2.0.Related issues
Follows #1280 (the same rule on the dashboards).