Report: Fix check for insufficient breaktime
还没有人认领这个 Issue。
评估
调研方向
首先找到 ReportViewSet.aggregate_days_content 和 calculate_worktime_breaktime,然后追踪 actual_breaktime 和 corrected_breaktime 的赋值和使用方式。检查现有报告测试中关于休息时间不足的部分,并为低于 30/45 分钟阈值的休息补充或调整测试覆盖。完成标准是检查能够检测出休息时间不足,且变量命名体现法定最低时长。
由索引模型根据 Issue 内容生成。
描述
The aggregate_days_content method of the ReportViewSet class checks if a worker has taken a break of less than 30/45 minutes depending on the worktime.
However, the condition for this check will never be fullfilled because the corrected_breaktime is checked.
This variable is set by the method calculate_worktime_breaktime to always be at least 30/45 minutes.
A possible solution would be to replace corrected_breaktime with actual_breaktime.
The name of corrected_breaktime could also be seen as misleading since the variable is the minimum length of breaktime set by the law.
The variable could be renamed to something like legal_breaktime.
- 主要语言
- Python
- 星标
- 0
- 派生
- 4
- 平均合并
- 2 天 16 小时
- 30 天内合并 PR
- 5
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ClockGU/clock-backend 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
ClockGU/clock-backend#486 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
ClockGU/clock-backend#467 ·
-
Contract: Verlängerung nach dem Ablauf可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 3/5 1-2 天 新手友好度 65/100
ClockGU/clock-backend#485 ·
-
Faq: Supervisor Rubrik可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 3/5 1-2 天 新手友好度 68/100
ClockGU/clock-backend#484 ·
-
enhancement medium priority
难度 4/5 3-5 天 新手友好度 48/100
ClockGU/clock-backend#480 ·
查看 ClockGU/clock-backend 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复
-
bug (unverified)
难度 2/5 1-3 小时 新手友好度 62/100
scikit-hep/awkward#4581 · 1 条评论 ·
维护者通常 1 天内回复
-
ci-cd priority: low
难度 2/5 1-3 小时 新手友好度 75/100
LearningCircuit/local-deep-research#9163 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
supersonic-lumina/ENM156#50 ·
维护者通常 2 天内回复