Bug 966293 - Add validation for expression when creating Dynagroup Definition
Add validation for expression when creating Dynagroup Definition
Product: RHQ Project
Classification: Other
Component: CLI, Core Server (Show other bugs)
All All
unspecified Severity unspecified (vote)
: ---
: RHQ 4.9
Assigned To: Jirka Kremser
Mike Foley
Depends On:
Blocks: 880819
  Show dependency treegraph
Reported: 2013-05-22 20:05 EDT by Jirka Kremser
Modified: 2013-09-24 15:08 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-09-24 15:08:56 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jirka Kremser 2013-05-22 20:05:07 EDT
Description of problem:
The current version lets user to create invalid definition of dynagroup and it firstly fails with the first recalculation call. The should be some mechanism for verifying the correctness of the expression defined by this [1] grammar.

[1] https://docs.jboss.org/author/display/RHQ/Group+Definitions#GroupDefinitions-EBNFGrammar

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. open a view for creating new dynagroup definition (url fragment #Inventory/Groups/DynagroupDefinitions/0)
2. type in some name
3. type in some invalid expression. You may want to use "rhq rocks!" for instance.
4. save it

Actual results:
it was saved

Expected results:
the exception with a clear message describing what is wrong should be thrown

Additional info:
The validation should be done also for the methods exposed via the CLI
Comment 1 Mike Foley 2013-07-02 11:13:43 EDT
moving out of JON 3.2 per 7/2/2013 meeting with loleary, heiko, foley, crouch
Comment 2 Jirka Kremser 2013-07-10 12:45:01 EDT
branch:  master
link:    http://git.fedorahosted.org/cgit/rhq/rhq.git/commit/?id=378301882
time:    2013-07-10 18:44:17 +0200
commit:  3783018826b0ebbe069751842cde15e75bc29bb2
author:  Jirka Kremser - jkremser@redhat.com
message: [BZ 966293] - Add validation for expression when creating Dynagroup
         Definition - adding a check to
         GroupDefinitionManagerBean.validate() method. Also making
         sure, the right message is correctly propagated to the web UI.
Comment 3 Filip Brychta 2013-08-29 05:58:04 EDT
Verified on 
Version: 4.9.0-SNAPSHOT
Build Number: e3e001b

for both the UI and CLI
Comment 4 Heiko W. Rupp 2013-09-24 15:08:56 EDT
Bulk closing of RHQ 4.9 verified items

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