Bug 535806 (RHQ-2464)

Summary: Alert definition creation doesn't reject invalid number format
Product: [Other] RHQ Project Reporter: Jeff Weiss <jweiss>
Component: AlertsAssignee: John Mazzitelli <mazz>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: low Docs Contact:
Priority: low    
Version: 1.3CC: cwelton, dajohnso, whayutin
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
URL: http://jira.rhq-project.org/browse/RHQ-2464
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-02 03:23:08 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 547833, 562434, 565632, 585306, 591531    

Description Jeff Weiss 2009-10-14 14:54:00 EDT
To Repeat:

Create an alert def, on the "Absolute Value" or "% of" number fields, enter a number formatted like this:  "1.2.3" or "99.9.9".  Fill out the rest of the alert fields and click ok.  Instead of rejecting the bad input, it accepts it, but truncates from the 2nd dot.
Comment 1 Red Hat Bugzilla 2009-11-10 16:04:56 EST
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-2464
Comment 2 wes hayutin 2010-02-07 10:04:27 EST
There may be several field checking issues regarding Alerts, I have found a few as well.  Can you drive this bug, and look for other similar issues.
Comment 3 Bryan Kearney 2010-02-08 09:48:23 EST
I will assign out when it is updated.
Comment 4 wes hayutin 2010-02-08 10:21:54 EST
Sorry, I may have been unclear.
The bug is what is described in the description.
It is ready to be assigned to a developer.  Sachin will be the QA contact.

Comment 5 spandey 2010-02-10 09:05:23 EST
I am able to create Alert Name with spl char 

ie : ******************
 which should not be allowed .
Alert if Condition absolute Value option accepts -ve value 
ie : -0.1B
which should not be allowed
Comment 6 wes hayutin 2010-02-17 08:27:16 EST
mass move to rhq_chainsaw tracker bug
Comment 7 wes hayutin 2010-02-18 09:49:49 EST
This bug has now been triaged by Chainsaw on 2/18. The expectation is the bug to be addressed by the end of sprint06 roughly 3/10/10.
Comment 8 Justin Harris 2010-02-24 12:25:58 EST
In commit:  dbbfa75ddfa4ce4443f2f72df49b483970ea4e8c
Comment 9 wes hayutin 2010-02-25 17:29:33 EST
using names for alerts like 1.2.3 and 99.9% seem to be valid now and the links work

Comment 10 wes hayutin 2010-02-26 09:02:05 EST
botched this verify.. 

adding 99.9.9 to abs value to a measurement threshold.
try strings.. "asdf"
Comment 11 wes hayutin 2010-02-26 09:16:46 EST
now trying w/ 
Measurement Baseline
any metric
is > x
enter in 10.8888888888

The value is truncated to 10.9 after submit.
So as the bug is written this fails.

passing back to jharris to either fix or close as working as designed.
Comment 12 wes hayutin 2010-02-26 09:26:29 EST
sorry.. and to add..

Measurement Baseline
any metric
is > x
enter in
The value is truncated to 1.2 after submit. should be rejected as invalid..
Comment 13 Jeff Weiss 2010-04-09 10:21:14 EDT
Reassigning because I'm pretty sure Justin is no longer the dev for this component.
Comment 14 John Mazzitelli 2011-02-17 12:05:36 EST
will look to see about putting in validators on the fields
Comment 15 John Mazzitelli 2011-02-18 16:44:34 EST
commit f211290

The following fields now have validators on them:

Measurement Absolute Value Threshold : Metric Value
Measurement Baseline Threshold : Baseline Percentage
Call Time Value Threshold : Call Time Value
Call Time Value Change : Percentage Change

You now must enter a valid decimal. NOTE: you do not enter the percentage values as decimals (i.e. you do not enter .4 to mean 40%, you explicitly enter "40" to represent 40%) but you can enter fractional percentages (i.e. you enter "40.5" to represent 40.5%).
Comment 16 Mike Foley 2011-06-13 15:39:37 EDT
verified as follows: tested numeric fields with invalid numeric values...

9.9 valid
9.9.9 invalid
0.1 valid
0.1B invalid
abc invalid
#111 invalid
Comment 17 Heiko W. Rupp 2013-09-02 03:23:08 EDT
Bulk closing of issues that were VERIFIED, had no target release and where the status changed more than a year ago.