summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2024-09-11 07:32:07 +0000
committerGo MAEDA <maeda@farend.jp>2024-09-11 07:32:07 +0000
commit1a70514aeb2e5cd22c950726bb0270b0405a8031 (patch)
tree92d182e87e85da3ef2fe453912489388499dbaff /app
parent6b736fe5331e5fdff9cde07d915f26137bccef75 (diff)
downloadredmine-1a70514aeb2e5cd22c950726bb0270b0405a8031.tar.gz
redmine-1a70514aeb2e5cd22c950726bb0270b0405a8031.zip
Merged r23048 from trunk to 5.1-stable (#8539).
git-svn-id: https://svn.redmine.org/redmine/branches/5.1-stable@23049 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/models/issue.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index 6e69b5560..31d2f75dd 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -1018,7 +1018,7 @@ class Issue < ActiveRecord::Base
# Returns true if this issue is blocked by another issue that is still open
def blocked?
- !relations_to.detect {|ir| ir.relation_type == 'blocks' && !ir.issue_from.closed?}.nil?
+ relations_to.any? {|ir| ir.relation_type == 'blocks' && ir.issue_from&.closed? == false}
end
# Returns true if this issue can be closed and if not, returns false and populates the reason