From 47841fbbac141494c656253f50c98fdbd34b6496 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Wed, 5 Feb 2014 21:53:21 +0100 Subject: [PATCH] Added tags to get indexed for search. --- app/models/ticket/search_index.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/models/ticket/search_index.rb b/app/models/ticket/search_index.rb index c9423e06f..19de07e08 100644 --- a/app/models/ticket/search_index.rb +++ b/app/models/ticket/search_index.rb @@ -35,6 +35,13 @@ returns next if value != true attributes.delete( key.to_s ) } + + # add tags + tags = Tag.tag_list( :object=> 'Ticket', :o_id => self.id ) + if tags && !tags.empty? + attributes[:tag] = tags + end + attributes = search_index_attribute_lookup( attributes, self ) # add article data