Bug 820716
| Summary: | search bar code for availability querying looks broken | |||
|---|---|---|---|---|
| Product: | [Other] RHQ Project | Reporter: | John Mazzitelli <mazz> | |
| Component: | SearchBar | Assignee: | John Mazzitelli <mazz> | |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Mike Foley <mfoley> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | urgent | |||
| Version: | 4.4 | CC: | hrupp, jkandasa | |
| Target Milestone: | --- | |||
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | Bug Fix | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 825318 (view as bug list) | Environment: | ||
| Last Closed: | 2013-09-02 07:23:36 UTC | Type: | Bug | |
| 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: | 782579, 825318 | |||
we also have to make sure we filter out uncommitted resources (which is how I originally found this - I was looking at queries accessing the explicitResources and implicitResources and seeing if they need to add a where clause for res.inventoryStatus = 'COMMITTED' We should investigate if this is an issue git commit to master: 6641616 when viewing group lists, in the search bar, you can now specify "availability=down" for example and the only groups you will see are those groups where all members are down. Same with "up" and "disabled" This also supports != as before. will try to write a unit test for this. if all goes well in master, will clone and put in jon 3.1.0 git commit to master f4c13d0 - this is some new unit tests for the availability keyword in the search expression Verified on the build: JBoss Operations Network Version: 3.1.1.ER3 Build Number: 37108ca:67c6de8 GWT Version: 2.4.0 SmartGWT Version: 3.0 Bulk closing of issues that were VERIFIED, had no target release and where the status changed more than a year ago. |
see this: org.rhq.enterprise.server.search.translation.GroupSearchTranslator.getSearchFragment specifically this code: return new SearchFragment( // SearchFragment.Type.PRIMARY_KEY_SUBQUERY, "SELECT rg.id" // + " FROM ResourceGroup rg " // + " WHERE ( SELECT AVG( iavail.availabilityType ) " // + " FROM rg.explicitResources ires " // + " JOIN ires.currentAvailability iavail ) " + numericAvailabilityFragment); We can't do AVG on avail type anymore - since we have more than 0 (down) and 1 (up). We have 2 (unknown) and 3 (disabled) so averaging won't give us what we are expecting. I think this is code that lets us use "availability" in the search bar to search for availability=UP and availabiltiy=DOWN (and whatever else we allow.. MIXED??? DISABLED??? UNKNOWN???) We need to double check the search bar ability to query on avaialbilty and get it to work for groups.