Bug 610228 - SearchBar: add error reporting mechanism
Summary: SearchBar: add error reporting mechanism
Alias: None
Product: RHQ Project
Classification: Other
Component: SearchBar   
(Show other bugs)
Version: 3.0.0
Hardware: All
OS: Linux
medium vote
Target Milestone: ---
: ---
Assignee: Joseph Marques
QA Contact: Filip Drabek
Depends On:
TreeView+ depends on / blocked
Reported: 2010-07-01 19:32 UTC by Joseph Marques
Modified: 2010-08-12 16:50 UTC (History)
2 users (show)

Fixed In Version: 2.4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-08-12 16:50:25 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Example of output to hide from users. (14.09 KB, image/png)
2010-07-19 12:31 UTC, Heiko W. Rupp
no flags Details

Description Joseph Marques 2010-07-01 19:32:54 UTC
Currently, there is no mechanism to report errors back to the user for invalid search expressions.  For instance, if a user types "availability=dwn" by accident (leaving out the letter 'o'), then the translator will treat this term as invalid because there is no AvailabilityType enum called 'dwn'.  It would be nice if there were an error message added somewhere to the interface to notify users that their expression is invalid...and the more accurate that error message the better.

Comment 1 Joseph Marques 2010-07-01 19:35:31 UTC
Without this fix, it would be difficult for users to know which of a series of search terms is being ignored under the covers, and thus why their search isn't returning the resources they think it should be returning.

Comment 2 Joseph Marques 2010-07-13 16:38:45 UTC
commit 965da8b99fea42c04bc8dc07cb54b405daa13a3d
Author: Joseph Marques <joseph@redhat.com>
Date:   Tue Jul 13 12:36:04 2010 -0400

BZ-610228: allow search expression errors to bubble up to the inventory browser
* create new SearchExpressionException runtime exception class
* update RHQL.g grammar file, short-cut and throw SearchExpressionException on error
* allow CriteriaQueryGenerator to directly pass SearchExpressionExceptions up to the caller
* update the inventory browser layout file to use rich:messages to show ajax-errors
* add inventoryBrowserErrorPanel to list of rerendered objects when invoking resource/group search
** (Note: 'requestDelay' attribute is required, otherwise msg is sometimes lost)
* add exception handlers in Browse(Resource|Group)UIBean.fetchDataForPage to add appropriate faces message on error

Comment 3 Charles Crouch 2010-07-16 18:25:27 UTC
Marking this as urgent to ensure prioritized QE

Comment 4 Heiko W. Rupp 2010-07-19 12:30:37 UTC
Technically this works, but the way it works is not user friendly - see 
screenshot. We must not show "runtime exception : Illegal Argument Exception 
.." stuff

Comment 5 Heiko W. Rupp 2010-07-19 12:31:25 UTC
Created attachment 432852 [details]
Example of output to hide from users.

Comment 6 Joseph Marques 2010-07-19 14:46:51 UTC
commit 9c2972b0e0abdfb4a89870a22a17a80ea01f9aa2
Author: Joseph Marques <joseph@redhat.com>
Date:   Mon Jul 19 10:44:41 2010 -0400

    BZ-610228: pretty up SearchBar error messages


heiko, can you retest and let me know what you think of the new error message handling?

Comment 7 Heiko W. Rupp 2010-07-20 09:21:52 UTC
This is now much improved in 10856:52c274a and the message does not show the technical messages any more.

Comment 8 Corey Welton 2010-08-12 16:50:25 UTC
Mass-closure of verified bugs against JON.

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