Project

General

Profile

Actions

Bug #4293

closed

Scoped search breaks on some relations

Added by Marek Hulán about 10 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Search
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

I can't search using taxonomies anywhere except hosts (which have belongs_to instead of has_many relation). This is blocker for #812.

To reproduce, go to e.g. subnets page and try to find subnets from specific organization like this
"organization = RedHat"

you'll receive

NoMethodError in SubnetsController#index

undefined method `klass' for nil:NilClass

app/controllers/subnets_controller.rb:5:in `index'
app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call'

Parameters:

{"utf8"=>"✓",
 "search"=>"organization = RedHat",
 "locale"=>nil}

Related issues 3 (0 open3 closed)

Related to Foreman - Bug #2767: Seach for host.hostgroup in /fact_values raise 500 error Resolved07/10/2013Actions
Related to Foreman - Bug #4563: ruby193-rubygem-scoped_search-2.6.3-1.el6.noarch breaks searching via the api with foreman-1.4.1ClosedAmos Benari03/06/2014Actions
Blocks Foreman - Feature #812: cant assign roles to groups, just to usersClosedMarek Hulán03/31/2011Actions
Actions

Also available in: Atom PDF