Merged
Conversation
Walkthroughレポート作成フォーム内の説明フィールドの事前入力ロジックが変更されました。登録済みテンプレートが存在する場合に自動的に適用されていた処理から、ユーザーが説明を入力していない場合のみテンプレートを使用するように制限されました。 Changes
Sequence DiagramsequenceDiagram
participant User
participant Form as フォーム
participant Template as テンプレート
rect rgb(200, 220, 255)
Note over User,Template: 変更前: registered_template が存在すれば常に適用
User->>Form: フォーム表示要求
alt registered_template 存在
Form->>Template: テンプレート取得
Template-->>Form: テンプレート値
Form-->>User: 説明欄にテンプレート値を事前入力
end
end
rect rgb(220, 255, 220)
Note over User,Template: 変更後: 説明が空白かつテンプレート存在で適用
User->>Form: フォーム表示要求
alt 説明が空白 AND registered_template 存在
Form->>Template: テンプレート取得
Template-->>Form: テンプレート値
Form-->>User: 説明欄にテンプレート値を事前入力
else 説明が入力済み
Form-->>User: ユーザー入力値を保持
end
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 変更範囲が単一ファイルの条件判定修正であり、ロジックの複雑性も低いため、影響範囲の確認と入力条件の妥当性検証を中心に審査できます。 Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
yokomaru
approved these changes
Oct 17, 2025
Contributor
There was a problem hiding this comment.
@hirokiej
お疲れ様です!
確認しました!問題なさそうなのでApproveします!
- 確認した動線
- テンプレート登録済みで日報新規作成 → テンプレートが表示されていること
- テンプレート登録済みで日報新規作成→ 内容を修正してWIPで保存 → 保存した内容が編集画面に表示されること
- ↑の日報のタイトルを空欄にしてWIPで保存 → エラー時にも保存した内容が置き換わらないこと
- WIPの日報を編集 → 提出 → 編集した内容で表示(保存)されること
- 提出済みの日報を編集 → テンプレートに置き換わらずに保存した内容が表示されていること
- 日報をコピーで新規作成 → テンプレートに置き換わらずに保存した内容が表示されていること
- テンプレートなしで新規作成 → 内容欄が空欄になっていること
- ↑の状態でWIP で保存 → 空欄のためエラーになること
Contributor
Author
|
@komagata さん |
Contributor
Author
|
@komagata さん |
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.
Issue
概要
テンプレートを登録しているユーザーが日報を提出してできずにエラーが起きた時や、編集しようとした時(提出済みも含む)、自動でテンプレートが挿入されてしまい、元々の本文が消えてしまうバグを解消しました。
@yokomaru さんに画面共有で確認してもらいました。
変更確認方法
bug/automatically-insert-report-temlate-anytimeをローカルに取り込むID:
machidaPASS:
testtest(もし、テンプレートが作成されていなかったら任意の文字列を登録する。)
Summary by CodeRabbit
Bug Fixes