Skip to content

fix: トラブルのレスキューで発生場所と詳細が入れ替わって届くのを直す - #552

Merged
taminororo merged 1 commit into
developfrom
fix/kanba/551/trouble-place-detail-swap
Sep 19, 2026
Merged

taminororo merged 1 commit into
developfrom
fix/kanba/551/trouble-place-detail-swap

Conversation

@taminororo

@taminororo taminororo commented Sep 19, 2026 •

Copy link
Copy Markdown
Collaborator

対応Issue

resolve #551

概要

トラブルのレスキューで、「発生場所」と「詳細」が入れ替わって届くのを直す。

送信関数の定義が (detail, place)、呼び出しが (place, detail) の順になっていた。どちらも String の位置引数なので、コンパイラも analyze も検出しない。place と detail を名前付き引数にして、呼び出し側で名前を書く形にした。

// 変更後の呼び出し
final isSuccess = await _sendRescueRequest(
  context,
  selectedTask,
  place: place,
  detail: detail,
);

人が来ない(int missingNumber, String place)は型が違うので入れ替えられず、質問は引数が1つなので、同じ問題はない。

テスト項目

  • fvm flutter analyze が No issues であること(確認済み)
  • ローカルの DB・API・偽の GAS に向けてトラブルの画面から送信し、発生場所に PLACE-lecture306、詳細に DETAIL-no-polybag を入れて、次のとおり届くこと(確認済み)
DB trouble_rescues: place = PLACE-lecture306 / detail = DETAIL-no-polybag
GAS への送信内容:   "place":"PLACE-lecture306", "detail":"DETAIL-no-polybag"

備考

  • 9/19 までに届いた本番のトラブル3件は入れ替わったまま残る(DB・スプシとも)。執行部は対応済み
  • 検証の途中で、シフトが1件もないユーザーがトラブル・人が来ないの画面を開くと「データの取得に失敗しました」になることに気づいた。GET /tasks/users/:id が空リストを [] ではなく null で返すため(AGENTS.md の「空リスト返却」の移行中の問題)。本番は全員にシフトがあるので現状は影響しない。この PR では直していない
  • 反映は mobile の build と up -d mobile だけでよく、API は止まらない

Summary by CodeRabbit

  • バグ修正
    • 救援要請の送信時に、場所と詳細情報が入れ替わる可能性がある問題を修正しました。
    • 入力内容が正しい項目に送信されるようになりました。

_sendRescueRequest の定義が (detail, place)、呼び出しが (place, detail) の順になっていた。どちらも String の位置引数なのでコンパイラも analyze も検出しない。place と detail を名前付き引数にして、呼び出し側で名前を書く形にする。
@coderabbitai

coderabbitai Bot commented Sep 19, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: NUTFes/SeeFT/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 7248e5fd-b75a-407d-8a5d-b99d999fba32

📥 Commits

Reviewing files that changed from the base of the PR and between 99f0830 and 6912355.

📒 Files selected for processing (1)
  • mobile/lib/pages/rescue/rescue_request_tab/tab_pages/trouble.dart

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

レスキュー送信関数の place と detail を必須の名前付き引数へ変更しました。呼び出し側も名前付き引数を使用し、引数の順序による値の入れ替わりを防ぎます。

Changes

レスキュー送信引数の安全化

Layer / File(s) Summary
場所と詳細の名前付き引数化
mobile/lib/pages/rescue/rescue_request_tab/tab_pages/trouble.dart
_sendRescueRequest の place と detail を必須の名前付き引数へ変更しました。呼び出し側も名前付き引数で値を渡すよう更新しました。

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix · Severity of issue fixed: Medium

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed タイトルは、トラブルのレスキューで「発生場所」と「詳細」が入れ替わる問題の修正を明確に示しています。変更内容と一致しています。
Description check ✅ Passed Issue番号、概要、変更理由、テスト項目、検証結果、備考を記載しています。スクリーンショット欄はありませんが、テンプレート上で任意です。説明は変更内容を判断するために十分です。
Linked Issues check ✅ Passed Issue #551 は、レスキュー送信の place と detail の入れ替わりを防ぐため、_sendRescueRequest を名前付き引数に変更し、呼び出し側でも引数名を指定することを求めています。変更概要では、宣言を required String place と required String detail に変更し、呼び出し側も名前付き引数に更新しています。こ…
Out of Scope Changes check ✅ Passed 変更は mobile/lib/pages/rescue/rescue_request_tab/tab_pages/trouble.dart の対象関数の引数定義と呼び出しに限定されています。変更内容は Issue #551 の不具合修正に直接関連します。無関係な変更は確認されません。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@taminororo
taminororo merged commit 6ef97a5 into develop Sep 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

トラブルのレスキューで発生場所と詳細が入れ替わって届く

1 participant