summaryrefslogtreecommitdiffstats
path: root/app/controllers/issue_relations_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-01-27 21:38:47 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-01-27 21:38:47 +0000
commit898a8c885b78af75e0ca14f6cd53c5357d039744 (patch)
tree31f7def5c5cf41feef05f890ed04122367ddcf57 /app/controllers/issue_relations_controller.rb
parent73a2d926f6e43d360421eff3e207b42bd5172184 (diff)
downloadredmine-898a8c885b78af75e0ca14f6cd53c5357d039744.tar.gz
redmine-898a8c885b78af75e0ca14f6cd53c5357d039744.zip
Fixed: Relations are not displayed after adding/removing an issue relation (#7463).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4764 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/issue_relations_controller.rb')
-rw-r--r--app/controllers/issue_relations_controller.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/issue_relations_controller.rb b/app/controllers/issue_relations_controller.rb
index 7462adca8..b095df37a 100644
--- a/app/controllers/issue_relations_controller.rb
+++ b/app/controllers/issue_relations_controller.rb
@@ -28,6 +28,7 @@ class IssueRelationsController < ApplicationController
respond_to do |format|
format.html { redirect_to :controller => 'issues', :action => 'show', :id => @issue }
format.js do
+ @relations = @issue.relations.select {|r| r.other_issue(@issue) && r.other_issue(@issue).visible? }
render :update do |page|
page.replace_html "relations", :partial => 'issues/relations'
if @relation.errors.empty?
@@ -47,7 +48,10 @@ class IssueRelationsController < ApplicationController
end
respond_to do |format|
format.html { redirect_to :controller => 'issues', :action => 'show', :id => @issue }
- format.js { render(:update) {|page| page.replace_html "relations", :partial => 'issues/relations'} }
+ format.js {
+ @relations = @issue.relations.select {|r| r.other_issue(@issue) && r.other_issue(@issue).visible? }
+ render(:update) {|page| page.replace_html "relations", :partial => 'issues/relations'}
+ }
end
end