search_index.rb 446 B

1234567891011121314151617181920
  1. # Copyright (C) 2012-2016 Zammad Foundation, http://zammad-foundation.org/
  2. module StatsStore::SearchIndex
  3. def search_index_attribute_lookup
  4. attributes = super
  5. return if !attributes
  6. begin
  7. record = attributes['stats_store_object'].constantize.lookup(id: o_id)
  8. return if !record
  9. attributes['stats_store_object_ref'] = record.search_index_attribute_lookup
  10. rescue
  11. return
  12. end
  13. attributes
  14. end
  15. end