summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-02-24 09:59:45 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-02-24 09:59:45 +0000
commit8e17c2aeaccdb5f166877e2b74fd1abe00506f48 (patch)
tree464815dab941c71c19aaa3b7c4b2fa9795c9ffc2 /app
parent85b872f340507d40c5f75e948b621952c7946cb3 (diff)
downloadredmine-8e17c2aeaccdb5f166877e2b74fd1abe00506f48.tar.gz
redmine-8e17c2aeaccdb5f166877e2b74fd1abe00506f48.zip
Fixed that relations may not be refreshed when adding a follows relation (#13251).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11461 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/controllers/issue_relations_controller.rb2
-rw-r--r--app/models/issue.rb1
2 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/issue_relations_controller.rb b/app/controllers/issue_relations_controller.rb
index bd2d2c42f..cd008529a 100644
--- a/app/controllers/issue_relations_controller.rb
+++ b/app/controllers/issue_relations_controller.rb
@@ -50,7 +50,7 @@ class IssueRelationsController < ApplicationController
respond_to do |format|
format.html { redirect_to issue_path(@issue) }
format.js {
- @relations = @issue.relations.select {|r| r.other_issue(@issue) && r.other_issue(@issue).visible? }
+ @relations = @issue.reload.relations.select {|r| r.other_issue(@issue) && r.other_issue(@issue).visible? }
}
format.api {
if saved
diff --git a/app/models/issue.rb b/app/models/issue.rb
index 43c298b77..4b95cc011 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -187,6 +187,7 @@ class Issue < ActiveRecord::Base
def reload(*args)
@workflow_rule_by_attribute = nil
@assignable_versions = nil
+ @relations = nil
super
end