Bug #51218 Should not allow creating a rule without any variables.
Submitted: 16 Feb 2010 19:10 Modified: 2 Mar 2010 10:46
Reporter: Mark Leith Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Server Severity:S3 (Non-critical)
Version:2.1.1.1141 OS:Any
Assigned to: Sloan Childers CPU Architecture:Any
Tags: windmill

[16 Feb 2010 19:10] Mark Leith
Description:
It is possible to create a rule which does not have any variable assignments, which leads to not being able to remove a server completely if it has this rule scheduled (Bug#51095 / EM-4059). 

How to repeat:
o Create a rule that does not have any variables assigned (just title, version, expression, frequency)
o Schedule the rule for a server
o Stop the server where the rule is scheduled
o Try to delete the stopped server
o Restart Tomcat

Suggested fix:
Whilst Bug#51095 is also being resolved, we should also validate the at least one variable has been assigned to the rule as a sanity check, and raise an error ("Each rule requires at least one variable to be defined" for example).
[18 Feb 2010 2:53] Enterprise Tools JIRA Robot
Sloan Childers writes: 
patch pushed to 2.2 (trunk)
- cleaned up UI error checking
- fixed some UI errors that cleared out user settings instead of displaying error and restoring them for fixing
- added exception in importRule to stop rules from being imported that are missing variables whether from the UI that didn't catch the error or from a bundle
[26 Feb 2010 19:51] Enterprise Tools JIRA Robot
Keith Russell writes: 
Patch installed in versions => 2.2.0.1633.
[2 Mar 2010 5:50] Enterprise Tools JIRA Robot
Marcos Palacios writes: 
Verified fixed in Monitor build 2.2.0.1633.

We get error:
U0068 One or more variables is required to make a functioning rule.
[2 Mar 2010 10:46] MC Brown
A note has been added to the 2.2.0 changelog: 

Creating a new custom rule without a configured variable would not raise an error. The system will now return U0068 One or more variables is required to make a functioning rule