Project

General

Profile

Bug #4293

Scoped search breaks on some relations

Added by Marek Hulán about 5 years ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Search
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Team Backlog:
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

Related to Foreman - Bug #2767: Seach for host.hostgroup in /fact_values raise 500 error Resolved2013-07-10
Related to Foreman - Bug #4563: ruby193-rubygem-scoped_search-2.6.3-1.el6.noarch breaks searching via the api with foreman-1.4.1Closed2014-03-06
Blocks Foreman - Feature #812: cant assign roles to groups, just to usersClosed2011-03-31

History

#1 Updated by Marek Hulán about 5 years ago

  • Related to Bug #2767: Seach for host.hostgroup in /fact_values raise 500 error added

#2 Updated by Marek Hulán about 5 years ago

  • Blocks Feature #812: cant assign roles to groups, just to users added

#4 Updated by Marek Hulán about 5 years ago

  • Status changed from New to Closed
  • Assignee set to Amos Benari
  • Target version set to 1.9.1
  • % Done changed from 0 to 100

Tested new 2.6.2 fixes the issue! Thank you Amos. #2767 still does not work, but that seems as different issue.

#5 Updated by Dominic Cleal about 5 years ago

RPM of 2.6.2 built and released to nightly.

#6 Updated by Dominic Cleal about 5 years ago

  • Legacy Backlogs Release (now unused) changed from 4 to 5

#7 Updated by Michael Moll about 5 years ago

  • Related to Bug #4563: ruby193-rubygem-scoped_search-2.6.3-1.el6.noarch breaks searching via the api with foreman-1.4.1 added

Also available in: Atom PDF