diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-01-29 22:01:40 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-01-29 22:01:40 +0000 |
commit | 79b12c73d9acd43f53918d23a9f3d94a516632b5 (patch) | |
tree | fd96e989ce48fdf294b9655be2acfdf62b704bd8 /app | |
parent | 0cd62a3c7776a311b0776899bf4734cd7f4e583a (diff) | |
download | redmine-79b12c73d9acd43f53918d23a9f3d94a516632b5.tar.gz redmine-79b12c73d9acd43f53918d23a9f3d94a516632b5.zip |
Display of multi custom fields.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8726 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/custom_fields_helper.rb | 2 | ||||
-rw-r--r-- | app/helpers/issues_helper.rb | 2 | ||||
-rw-r--r-- | app/helpers/timelog_helper.rb | 2 | ||||
-rw-r--r-- | app/views/versions/_overview.html.erb | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/app/helpers/custom_fields_helper.rb b/app/helpers/custom_fields_helper.rb index 639af95fb..7d1368fa8 100644 --- a/app/helpers/custom_fields_helper.rb +++ b/app/helpers/custom_fields_helper.rb @@ -117,7 +117,7 @@ module CustomFieldsHelper # Return a string used to display a custom value def format_value(value, field_format) if value.is_a?(Array) - value.collect {|v| format_value(v, field_format)}.join(', ') + value.collect {|v| format_value(v, field_format)}.compact.sort.join(', ') else Redmine::CustomFieldFormat.format_value(value, field_format) end diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 0b33d48fb..b061840fb 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -320,7 +320,7 @@ module IssuesHelper issues.each do |issue| col_values = columns.collect do |column| s = if column.is_a?(QueryCustomFieldColumn) - cv = issue.custom_values.detect {|v| v.custom_field_id == column.custom_field.id} + cv = issue.custom_field_values.detect {|v| v.custom_field_id == column.custom_field.id} show_value(cv) else value = issue.send(column.name) diff --git a/app/helpers/timelog_helper.rb b/app/helpers/timelog_helper.rb index e3c7615b2..e27425acb 100644 --- a/app/helpers/timelog_helper.rb +++ b/app/helpers/timelog_helper.rb @@ -118,7 +118,7 @@ module TimelogHelper entry.hours.to_s.gsub('.', decimal_separator), entry.comments ] - fields += custom_fields.collect {|f| show_value(entry.custom_value_for(f)) } + fields += custom_fields.collect {|f| show_value(entry.custom_field_values.detect {|v| v.custom_field_id == f.id}) } csv << fields.collect {|c| Redmine::CodesetUtil.from_utf8( c.to_s, diff --git a/app/views/versions/_overview.html.erb b/app/views/versions/_overview.html.erb index aea77af12..a57241158 100644 --- a/app/views/versions/_overview.html.erb +++ b/app/views/versions/_overview.html.erb @@ -5,7 +5,7 @@ <% end %> <p><%=h version.description %></p> -<% if version.custom_values.any? %> +<% if version.custom_field_values.any? %> <ul> <% version.custom_field_values.each do |custom_value| %> <% if custom_value.value.present? %> |