Feature #8215

Allow plugins to register as a search provider without a project association

Added by Alex Bevilacqua almost 12 years ago. Updated over 11 years ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Search engine
Target version:-
Resolution:

Description

Plugins can be added to the global search by means of

Redmine::Search.available_search_types << 'your_model'

But only if the model you're trying to search belongs_to :project. Without this association, though the plugin is added to the search providers, it will always error out with the following:

ActiveRecord::ConfigurationError in SearchController#index

Association named 'project' was not found; perhaps you misspelled it?

and if you actually add the required association, you'll never get any results (unless the user is associated with some project on the system).

Since Redmine is project-centric, I understand why the association is necessary, but wonder if there's a way to accommodate plugins that don't require a project ...

History

#1 Updated by Chris Darts almost 12 years ago

As a keen user of the knowledgebase plugin, which is not associated directly with a project, having the ability to search articles through the main Redmine search facility would be of great benefit.

I can imagine this would also be useful for a number of other non project-centic plugins.

#2 Updated by Joshua Villagomez almost 12 years ago

I too am interested in the progress if this feature request. We're using the knowledgebase plugin, and workarounds are necessary in order to make use of Redmine's robust search capabilities. It's frustrating for developers to maintain these workarounds (hacks) knowing that such can be avoided if Redmine did not require project dependency of plugins that make use of searching.

#3 Updated by Martin Denizet (redmine.org team member) over 11 years ago

  • Assignee set to Toshi MARUYAMA

Me too I'd like to have this feature for my plugins. +1
May you have a look, please, Toshi?

#4 Updated by Toshi MARUYAMA over 11 years ago

  • Assignee deleted (Toshi MARUYAMA)

#5 Updated by Steven Wong over 11 years ago

T Leung has support a hack, but I think maybe it should be modified in Redmine for next version.

http://www.redmine.org/boards/3/topics/23591?r=23740#message-23740

Also available in: Atom PDF