Bug 745245
Summary: | Filter on provider page fails with postgres error | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Jeff Weiss <jweiss> |
Component: | WebUI | Assignee: | Amos Benari <abenari> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Katello QA List <katello-qa-list> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.0.1 | CC: | austinpatrick711, bbuckingham, bkearney, dajohnso, ohadlevy |
Target Milestone: | Unspecified | Keywords: | Regression |
Target Release: | Unused | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-08-22 18:00:20 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 747354 |
Description
Jeff Weiss
2011-10-11 18:47:16 UTC
This appears to be an issue in the scoped_search gem generating invalid SQL. We had a similar issue with auto-complete which was addressed in scoped_search 2.3.4; however, looks like a similar issues exists on a search queries also. Another example that will generate this type of error is: provider.name = "spacewalk" generates the following error: SQLite3::SQLException: ambiguous column name: name: SELECT DISTINCT "providers".id FROM "providers" LEFT OUTER JOIN "products" ON "products"."provider_id" = "providers"."id" WHERE "providers"."organization_id" = 1 AND "providers"."provider_type" = 'Custom' AND (("products"."name" = 'spacewalk')) ORDER BY name LIMIT 25 Problem seemed to be the order statement not the scoped_search. fixed by commit #08385944d35e24d7f29dba4675cc5d7fbf606904 Unfortunately, I still see the same problem with the change committed. Example scenario: 1. create a provider : spacewalk 2. create a product under that provider : spacewalk_product 3. perform a provider search using : product.name = spacewalk_product generates the following exception: SQLite3::SQLException: ambiguous column name: name: SELECT DISTINCT "products".name FROM "products" INNER JOIN "providers" ON "providers"."id" = "products"."provider_id" WHERE "providers"."organization_id" = 1 AND (name LIKE 'spacewalk_product%') LIMIT 20 rather than "(name LIKE 'spacewalk_product%')", the query should contain something like "('products'.name LIKE 'spacewalk_product%')" Brad's repro scenario still fails. The original "plain" search term now works though. katello-0.1.95-1.git.56.344ea38.el6.x86_64 verified that the issues raised in the initial description and my repro scenario are no longer observable with scoped_search 2.3.6... that version of scoped_search gem has been pushed in to the git repos and should be available in an upcoming build. Verified, katello-0.1.116-1.git.0.ed4d8a9.el6.x86_64 getting rid of 6.0.0 version since that doesn't exist Thank goodness i have found someone else experiencing the same problem. https://www.mybkexperience.review/ |