summaryrefslogtreecommitdiffstats
path: root/app/models/custom_field.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-12-14 18:54:55 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-12-14 18:54:55 +0000
commit58610ec52af2249c4c5eebf35e11cd827a7966ab (patch)
treeb699b63943e7de4638a1c7c8ec03e21325f69ea4 /app/models/custom_field.rb
parent38b185f1dc4d296eb49c94a3ccff7496b1367c84 (diff)
downloadredmine-58610ec52af2249c4c5eebf35e11cd827a7966ab.tar.gz
redmine-58610ec52af2249c4c5eebf35e11cd827a7966ab.zip
Search engine: issue custom fields can now be searched.
Each issue custom field (excepting numeric, date and boolean fields) can be marked as "Searchable" (default to false). git-svn-id: http://redmine.rubyforge.org/svn/trunk@994 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/custom_field.rb')
-rw-r--r--app/models/custom_field.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb
index c3b5f2a9f..e1fd8666d 100644
--- a/app/models/custom_field.rb
+++ b/app/models/custom_field.rb
@@ -43,6 +43,8 @@ class CustomField < ActiveRecord::Base
def before_validation
# remove empty values
self.possible_values = self.possible_values.collect{|v| v unless v.empty?}.compact
+ # make sure these fields are not searchable
+ self.searchable = false if %w(int float date bool).include?(field_format)
end
def validate