コンテキストメニューのAJAXリクエストをGETからPOSTに変更(大量チケット選択時の不具合修正)#24
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
コンテキストメニューのAJAXリクエストをGETからPOSTに変更(大量チケット選択時の不具合修正)#24devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
チケット一括操作で493件以上選択時にコンテキストメニュー(サブメニュー)が 表示されない問題を修正。 原因: contextMenuShow()のAJAXリクエストがデフォルトのGETメソッドを使用して おり、選択チケット数が多い場合にURLクエリパラメータの長さがWebサーバーの 上限(通常8KB)を超過していた。 対応: AJAXリクエストのメソッドをPOSTに変更。ルーティングは既にGETとPOSTの 両方に対応しているため、サーバー側の変更は不要。 Co-Authored-By: morio <morio@agileware.jp>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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.
redmine.orgのチケットURL: https://www.redmine.org/issues/xxxx
概要
チケット一括操作で493件以上を選択して右クリックした際に、コンテキストメニュー(サブメニュー)が表示されない不具合を修正。
原因
contextMenuShow()の$.ajax()がデフォルトの GET メソッドを使用しているため、選択チケットのids[]=XXX&ids[]=XXX&...がURLクエリパラメータとして送信される。選択件数が多いとURLの長さがWebサーバーの上限(通常8KB)を超過し、リクエストが失敗する(413 or 414エラー)。対応
AJAXリクエストのメソッドを
postに変更。ルーティングは既に GET/POST 両方に対応済み(via: [:get, :post])のため、サーバー側の変更は不要。CSRFトークンは Rails UJS が jQuery AJAX リクエストに自動付与する。影響範囲
この変更はすべてのコンテキストメニュー(チケット、作業時間、ユーザー、プロジェクト)に適用される。
レビュー時の確認ポイント
routes.rbでvia: [:get, :post]を確認済み)TODO:
Link to Devin session: https://app.devin.ai/sessions/5d1e90ada43745cda88f80b0d948c9e1