task sheet: 期間未入力のタスクに開始日を入力すると終了が翌日 08:00 になる

Open
#1,647 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
75/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
java
Domain
backend

Research direction

Start with TaskSheetScheduleWorkflow.applyStartMutation and trace the separate path for tasks with no entered duration when Field.setText runs with FieldContext.isTaskSheetUpdate enabled. Align the end calculation with the existing duration path by using calendar.add(start, duration, true), then add manual and automatic regression coverage in TaskSheetScheduleWorkflowTest. Done means the Tuesday date-only start yields Tuesday 08:00–17:00 and the specified core, UI, and GUI tests pass.

Written by the indexing model from the issue text.

Description

area: core area: msp-compat bug priority: medium status: verification

概要

タスク表で新しいタスクを作り、期間を入力しないまま開始日を日付だけ(例: 火曜)で入力すると、終了が「火曜 17:00」ではなく「水曜 08:00」で保存される。タスクが 08:00〜翌 08:00 の 1 日に見え、終了日の列が 1 日先(水曜)を表示する。Microsoft Project では、既定の 1 日の期間(推定値)のタスクに開始日を入力すると、終了は同じ日の終業時刻になる。

#1644(PR #1645)では、期間を持つタスクの開始日入力で TaskSheetScheduleWorkflow.applyStartMutation が calendar.add(.., true) を使うように直した。期間が未入力(既定の推定期間)のタスクは別の経路を通っていて、まだ直っていない。
関連: #1642、#1644。

作業手順

  1. PR #1645 がマージされた master から始める。期間を入力していない新しいタスクに Field.setText(FieldContext.isTaskSheetUpdate を有効にしたもの)で開始日を入力する経路をたどり、終了を「次の稼働日の始業」に置いている箇所を特定する。
  2. 終了が、開始日から既定の期間を数えた最後の稼働日の終業時刻になるように直す。終了の計算には calendar.add(start, duration, true) を使う。期間を持つタスクの経路(#1644)と同じ規則にそろえる。
  3. TaskSheetScheduleWorkflowTest に回帰テストを追加する(手動・自動の両方)。修正前に失敗し、修正後に成功することを確認する。

検証

.\gradlew.bat :microproject_core:test --tests "*TaskSheetScheduleWorkflowTest*"
.\gradlew.bat :microproject_core:test :microproject_ui:test
.\gradlew.bat :microproject_ui:guiTest --tests "*TaskDurationGuiAcceptanceTest*" --tests "*TaskTableGanttGridGuiAcceptanceTest*"

完了条件

  • 期間を入力していない新しいタスクに開始日を火曜(日付のみ)で入力すると、開始が火曜 08:00、終了が火曜 17:00 になり、終了日の列が火曜を表示する(TaskSheetScheduleWorkflowTest に追加したテスト、手動・自動の両方)
  • 追加したテストが修正前のコードで失敗することを記録する
  • .\gradlew.bat :microproject_core:test :microproject_ui:test が成功する
  • 上の guiTest コマンドが成功する
  • build と GUI acceptance が通る

範囲外

  • 日付入力の解析(YearlessDateInputParser)の変更。
  • ガントバーのドラッグによる日付変更。
Dominant language
Java
Stars
2
Forks
1
Avg merge
4h 52m
Merged PRs (30d)
349

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tetsuji16/microProject

All issues in tetsuji16/microProject

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.