Bug 966293 - Add validation for expression when creating Dynagroup Definition
Summary: Add validation for expression when creating Dynagroup Definition
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: CLI, Core Server
Version: 4.8
Hardware: All
OS: All
unspecified
unspecified
Target Milestone: ---
: RHQ 4.9
Assignee: Jirka Kremser
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: 880819
TreeView+ depends on / blocked
 
Reported: 2013-05-23 00:05 UTC by Jirka Kremser
Modified: 2013-09-24 19:08 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-09-24 19:08:56 UTC
Embargoed:


Attachments (Terms of Use)

Description Jirka Kremser 2013-05-23 00:05:07 UTC
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):
4.8.0-SNAPSHOT

How reproducible:
always

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 15:13:43 UTC
moving out of JON 3.2 per 7/2/2013 meeting with loleary, heiko, foley, crouch

Comment 2 Jirka Kremser 2013-07-10 16:45:01 UTC
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
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 09:58:04 UTC
Verified on 
Version: 4.9.0-SNAPSHOT
Build Number: e3e001b

for both the UI and CLI

Comment 4 Heiko W. Rupp 2013-09-24 19:08:56 UTC
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.