diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-01-29 20:51:48 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-01-29 20:51:48 +0000 |
commit | cd6db6a3cbe43880eca4eec8c967fb78d95a2926 (patch) | |
tree | 42219d3f9b276f197f5045cec25639bb4e2be5fd /app/helpers/queries_helper.rb | |
parent | 0c5af16e14570a384e154430cd1e9fa123cdf579 (diff) | |
download | redmine-cd6db6a3cbe43880eca4eec8c967fb78d95a2926.tar.gz redmine-cd6db6a3cbe43880eca4eec8c967fb78d95a2926.zip |
Adds support for multiselect custom fields (#1189).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8721 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/queries_helper.rb')
-rw-r--r-- | app/helpers/queries_helper.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/helpers/queries_helper.rb b/app/helpers/queries_helper.rb index 681a19a45..bead33315 100644 --- a/app/helpers/queries_helper.rb +++ b/app/helpers/queries_helper.rb @@ -31,7 +31,14 @@ module QueriesHelper def column_content(column, issue) value = column.value(issue) - + if value.is_a?(Array) + value.collect {|v| column_value(column, issue, v)}.compact.sort.join(', ') + else + column_value(column, issue, value) + end + end + + def column_value(column, issue, value) case value.class.name when 'String' if column.name == :subject |