Allow plugins to register as a search provider without a project association
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 ...
#1 Updated by Chris Darts about 2 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 about 2 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.
#5 Updated by Steven Wong over 1 year ago
T Leung has support a hack, but I think maybe it should be modified in Redmine for next version.