Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 610228 - SearchBar: add error reporting mechanism
SearchBar: add error reporting mechanism
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: SearchBar (Show other bugs)
3.0.0
All Linux
urgent Severity medium (vote)
: ---
: ---
Assigned To: Joseph Marques
Filip Drabek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-01 15:32 EDT by Joseph Marques
Modified: 2010-08-12 12:50 EDT (History)
2 users (show)

See Also:
Fixed In Version: 2.4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-08-12 12:50:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 08:31 EDT, Heiko W. Rupp
no flags Details

  None (edit)
Description Joseph Marques 2010-07-01 15:32:54 EDT
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 15:35:31 EDT
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 12:38:45 EDT
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 14:25:27 EDT
Marking this as urgent to ensure prioritized QE
Comment 4 Heiko W. Rupp 2010-07-19 08:30:37 EDT
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 08:31:25 EDT
Created attachment 432852 [details]
Example of output to hide from users.
Comment 6 Joseph Marques 2010-07-19 10:46:51 EDT
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 05:21:52 EDT
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 12:50:25 EDT
Mass-closure of verified bugs against JON.

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