summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/issues_controller.rb2
-rw-r--r--app/views/issue_relations/create.js.erb1
-rw-r--r--app/views/issues/_relations.html.erb2
3 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index fb1c5765f..e1faa9b6b 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -113,6 +113,8 @@ class IssuesController < ApplicationController
@edit_allowed = User.current.allowed_to?(:edit_issues, @project)
@priorities = IssuePriority.active
@time_entry = TimeEntry.new(:issue => @issue, :project => @issue.project)
+ @relation = IssueRelation.new
+
respond_to do |format|
format.html {
retrieve_previous_and_next_issue_ids
diff --git a/app/views/issue_relations/create.js.erb b/app/views/issue_relations/create.js.erb
index 03ba21975..0c2e036cc 100644
--- a/app/views/issue_relations/create.js.erb
+++ b/app/views/issue_relations/create.js.erb
@@ -4,3 +4,4 @@ $('#relations').html('<%= escape_javascript(render :partial => 'issues/relations
$('#relation_issue_to_id').val('');
$('#relation_issue_to_id').focus();
<% end %>
+$('#new-relation-form').show();
diff --git a/app/views/issues/_relations.html.erb b/app/views/issues/_relations.html.erb
index 0cffa8f53..049d6f350 100644
--- a/app/views/issues/_relations.html.erb
+++ b/app/views/issues/_relations.html.erb
@@ -38,7 +38,7 @@
:as => :relation, :remote => true,
:url => issue_relations_path(@issue),
:method => :post,
- :html => {:id => 'new-relation-form', :style => (@relation ? '' : 'display: none;')}
+ :html => {:id => 'new-relation-form', :style => 'display: none;'}
} do |f| %>
<%= render :partial => 'issue_relations/form', :locals => {:f => f}%>
<% end %>