Patch #4800

Ability to add search providers from plugins

Added by Andrew Chaika over 7 years ago. Updated almost 7 years ago.

Status:ClosedStart date:2010-02-11
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Search engine
Target version:-

Description

When I was trying to upgrade Redmine Blogs plugin to 0.9.x Redmine and to implement an activity and a search providers I have found that the search engine (acts_as_searcheable, search_controller) in Redmine has hard-coded list of search providers/types without ability to add a new providers/types.
Thus I found that the activity/event/search subsystems are project dependent. In activity/event I have found workaround, but in search don't.
I have patched acts_as_searchable.rb and search_controller.rb to solve described problem.

Eric,

Could you review the patch and if it's OK apply it to the core?

acts_as_searchable_registration_and_search_by_global_modules.patch Magnifier (2.51 KB) Andrew Chaika, 2010-02-11 09:19


Related issues

Related to Redmine - Feature #3936: configurable list of models to include in search Closed 2009-09-28

History

#1 Updated by Andrew Chaika over 7 years ago

There is a similar issue #3936.

#2 Updated by Andrew Chaika over 7 years ago

  • Assignee changed from Eric Davis to Jean-Philippe Lang

Jean-Philippe, or anyone from the core developers team, could you review this patch and say what additionally I must do to bring such functionality to the Redmine code?

#3 Updated by Jean-Philippe Lang over 7 years ago

It breaks a test:

  1) Failure:
test_search_for_projects(SearchControllerTest) [/test/functional/search_controller_test.rb:28]:
<false> is not true.

I'll have a deeper look asap.

#4 Updated by Jean-Philippe Lang over 7 years ago

Another point about your patch, searchable types order depends on models loading order.
The search form is kind of messed up.

#5 Updated by Mischa The Evil almost 7 years ago

  • Status changed from New to Closed
  • Assignee deleted (Jean-Philippe Lang)

Closed the issue as being implemented by issue #3936.

Also available in: Atom PDF