summaryrefslogtreecommitdiffstats
path: root/app/helpers
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2023-02-01 07:11:25 +0000
committerGo MAEDA <maeda@farend.jp>2023-02-01 07:11:25 +0000
commit109b91145767726b4e99e7a36e4bf70f8d562d1c (patch)
tree49923df652551fa85964e8892a0b5d9ec6bca909 /app/helpers
parent57544d6d4be5a3058873a6fa142c665b8a122df6 (diff)
downloadredmine-109b91145767726b4e99e7a36e4bf70f8d562d1c.tar.gz
redmine-109b91145767726b4e99e7a36e4bf70f8d562d1c.zip
"Property changes" tab does not appear when all issue journals have both notes and property changes (#38217).
Patch by Go MAEDA. git-svn-id: https://svn.redmine.org/redmine/trunk@22085 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/issues_helper.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb
index ed041d145..9fcd480a5 100644
--- a/app/helpers/issues_helper.rb
+++ b/app/helpers/issues_helper.rb
@@ -695,8 +695,8 @@ module IssuesHelper
def issue_history_tabs
tabs = []
if @journals.present?
- journals_without_notes = @journals.select{|value| value.notes.blank?}
- journals_with_notes = @journals.reject{|value| value.notes.blank?}
+ has_details = @journals.any? {|value| value.details.present?}
+ has_notes = @journals.any? {|value| value.notes.present?}
tabs <<
{
:name => 'history',
@@ -705,7 +705,7 @@ module IssuesHelper
:partial => 'issues/tabs/history',
:locals => {:issue => @issue, :journals => @journals}
}
- if journals_with_notes.any?
+ if has_notes
tabs <<
{
:name => 'notes',
@@ -713,7 +713,7 @@ module IssuesHelper
:onclick => 'showIssueHistory("notes", this.href)'
}
end
- if journals_without_notes.any?
+ if has_details
tabs <<
{
:name => 'properties',