Bug 1302443 - "Name" parameter does not work with category Collection for querying
Summary: "Name" parameter does not work with category Collection for querying
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: API
Version: 5.5.0
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: GA
: 5.5.3
Assignee: Tim Wade
QA Contact: Jeff Teehan
URL:
Whiteboard:
Depends On: 1293891
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-27 22:21 UTC by Josh Carter
Modified: 2019-10-10 11:01 UTC (History)
10 users (show)

Fixed In Version: 5.5.3.2
Doc Type: Bug Fix
Doc Text:
Previously, the REST API could not filter resources using the name parameter. This was because all filter attributes were constructed into a SQL query regardless of whether they represented column names, and thus filtering by virtual attributes would result in a database error. The code now checks for non-column attributes before making the query, and filters by these attributes in Ruby after the results are returned.
Clone Of: 1293891
Environment:
Last Closed: 2016-04-13 18:42:02 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0616 0 normal SHIPPED_LIVE CFME 5.5.3 bug fixes and enhancement update 2016-04-13 22:38:44 UTC

Comment 4 Jeff Teehan 2016-04-07 18:53:14 UTC
Looks good.

This query as described above:
https://10.16.6.125/api/categories?expand=resources&filter[]=name=%27location%27

Produced this result:
{"name":"categories","count":23,"subcount":1,"resources":[{"href":"https://10.16.6.125/api/categories/306000000000001","id":306000000000001,"description":"Location","read_only":false,"syntax":"string","single_value":true,"example_text":"The geographic location of the resource, such as New York, Chicago, or London.","tag_id":306000000000004,"parent_id":0,"show":true,"default":true,"name":"location","actions":[{"name":"edit","method":"post","href":"https://10.16.6.125/api/categories/306000000000001"},{"name":"delete","method":"post","href":"https://10.16.6.125/api/categories/306000000000001"},{"name":"delete","method":"delete","href":"https://10.16.6.125/api/categories/306000000000001"}]}],"actions":[{"name":"edit","method":"post","href":"https://10.16.6.125/api/categories"},{"name":"create","method":"post","href":"https://10.16.6.125/api/categories"},{"name":"delete","method":"post","href":"https://10.16.6.125/api/categories"}]}

Moving to Verified using 5.5.3.3 with appliance referenced above.

Comment 6 errata-xmlrpc 2016-04-13 18:42:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:0616


Note You need to log in before you can comment on or make changes to this bug.