Bug 616634
Summary: | possible issues with CriteriaQueryGenerator ordering results by nullable, path expression | ||
---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | Joseph Marques <jmarques> |
Component: | Core UI | Assignee: | Joseph Marques <jmarques> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Corey Welton <cwelton> |
Severity: | medium | Docs Contact: | |
Priority: | high | ||
Version: | 3.0.0 | CC: | jsefler |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | 2.4 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2010-08-12 16:44:30 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: | 601949 |
Description
Joseph Marques
2010-07-21 03:01:45 UTC
This issue is known to occur in the following cases for Criteria objects: ResourceCriteria parentResourceName (sortOverrides) ResourceGroupCriteria resourceTypeName (sortOverrides) ----- However, since the QCG allows arbitrary control of the generated PageControl object which then is used to construct the 'ORDER BY' clause, we need to check UI paths that use criteria objects with explicitly overridden PCs to see if they would exploit this issue in more ways. As seen by QA, and as discussed above, this definitely happens when sorting on the group browser. /rhq/inventory/browseGroups.xhtml "Group Type" column maps to resourceType.name path filter "Plugin" column maps to resourceType.plugin path filter My recommendation would be to remove the ability to sort groups by type/plugin for the JON 2.4 release. After release, we can look into fixing the query generation strategy in the CQG, such that it always generates a count-query whose integer result represents the exact cardinality of the corresponding data-query. With a much more powerful SearchBar for groups in JON 2.4 the necessity to sort is significantly diminished. Considering users can filter by type/plugin, using substring, case-insensitive matching on each of those names, complex AND/OR expressions, I don't think we're taking much away at the cost of ensuring users won't see oddities when using a very prominent feature. commit 26c62395c00fd7917693a3a103298428f2f1c86e (master) Author: Joseph Marques <joseph> Date: Thu Jul 22 01:23:18 2010 -0400 BZ-616634: support criteria-based sorting by nullable path expressions * for each ordering token, decide whether it's a path expression * if it is, determine if it has at least 3 parts (criteriaAlias + path + leaf) * if it does, add left join for part that precedes the leaf, and generate an alias for this path ** only add the join clause if it doesn't already exist in the generated query * finally, add the order by clause, with the generated path aliases as necessary For 2.4, the change is to test that you can't sort groups by type/plugin on the resource browser page QA Verified. Mass-closure of verified bugs against JON. |