Bug 689922

Summary: sorting on ancestry column throws exception
Product: [Other] RHQ Project Reporter: John Mazzitelli <mazz>
Component: Core UIAssignee: Jay Shaughnessy <jshaughn>
Status: CLOSED CURRENTRELEASE QA Contact: Corey Welton <cwelton>
Severity: medium Docs Contact:
Priority: high    
Version: 4.0.0.Beta1CC: hrupp, skondkar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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: 585306    

Description John Mazzitelli 2011-03-22 19:38:55 UTC
Try to sort on ancestry column. You get:

Caused by: org.hibernate.QueryException: could not resolve property: resourceAncestry of: org.rhq.core.domain.resource.Resource [SELECT new org.rhq.core.domain.resource.composite.ResourceComposite(   resource,    resource.currentAvailability.availabilityType ) 
FROM org.rhq.core.domain.resource.Resource resource
WHERE ( resource.inventoryStatus = :inventoryStatus 
AND resource.parentResource.id = :parentResourceId )
ORDER BY resource.resourceAncestry DESC
]

It would be nice if we were able to sort this column by on location in the hierarchy (peer resources are sorted alphanumerically). If we can't do that, turn off the ability to sort on that column.

Comment 1 John Mazzitelli 2011-03-22 20:46:55 UTC
i only see this in the Inventory tab of a recursive group.

Comment 2 John Mazzitelli 2011-03-22 21:08:31 UTC
commit 8fe2c07

to test - go to a group that is recursive, Inventory>Members tab and sort on the ancestry column and see that it doesn't bomb with an error message.

Comment 3 Sunil Kondkar 2011-04-21 09:00:32 UTC
Verified on build#1175 (Version: 4.0.0-SNAPSHOT Build Number: a90faf9)

Created a recursive group and navigated to Inventory>Members tab of the group.
Clicking on ancestry column does not throw exception.

Also tried to sort on 'Ancestry' column in other parts of UI. It's working except in Reports->Configuration History tab. There is a separate bug filed for that (https://bugzilla.redhat.com/show_bug.cgi?id=697484).

Marking this bug as verified.

Comment 4 Corey Welton 2011-05-24 01:15:29 UTC
Bookkeeping - closing bug - fixed in recent release.

Comment 5 Corey Welton 2011-05-24 01:15:29 UTC
Bookkeeping - closing bug - fixed in recent release.

Comment 6 Corey Welton 2011-05-24 01:15:32 UTC
Bookkeeping - closing bug - fixed in recent release.

Comment 7 Corey Welton 2011-05-24 01:15:39 UTC
Bookkeeping - closing bug - fixed in recent release.