Report: Fix check for insufficient breaktime

オープン 初心者向け
#487 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
api, backend

調査の方向性

まず 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時間
マージ済み PR(30日)
5

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ClockGU/clock-backend のほかの issue

ClockGU/clock-backend の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。