Project

General

Profile

Actions

Defect #17517

closed

Attempting to Add a Related Issue Multiple Times Sequentially Causes 500

Added by Zach Auclair over 10 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
UI
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

When pressing "Add" after typing a related issue, the form ajax submits but does not prevent further ajax submits while the request is being processed.

As a result of this, clicking "add" multiple times quickly will cause sequential requests to link an issue (after the first) to fail; along with this, the results of the last post are displayed (meaning the first successful add of a related issue may be hidden).

proposed patch:

diff --git a/app/views/issue_relations/_form.html.erb b/app/views/issue_relations/_form.html.erb
index 29b7f0f..ff80e47 100644
--- a/app/views/issue_relations/_form.html.erb
+++ b/app/views/issue_relations/_form.html.erb
@@ -5,7 +5,7 @@
 <span id="predecessor_fields" style="display:none;">
 <%= l(:field_delay) %>: <%= f.text_field :delay, :size => 3 %> <%= l(:label_day_plural) %>
 </span>
-<%= submit_tag l(:button_add) %>
+<%= submit_tag l(:button_add), :disable_with => l(:button_add) %>
 <%= link_to_function l(:button_cancel), '$("#new-relation-form").hide();'%>
 </p>


Related issues

Related to Redmine - Feature #23630: Migrate to Rails 5.2ClosedJean-Philippe Lang

Actions
Actions

Also available in: Atom PDF