the issue: cascading is a UI-based option for general properties and conditions sections for alert templates, but it is an assumed "yes" answer when updating notifications and consequential control actions. this inconsistency causes issues with some users (RHQ-685). the proposed solution: after much discussion (see attached convo) an alert template will *always* cascade to children resources, and thus always override local resource-level changes. however, alert definitions will now have a new "read-only" option that can suppress/ignore changes when its parent alert template is modified.
this issue supersedes the suggested changes for RHQ-685. accordingly, RHQ-685 will be closed / rejected.
The read-only flag should be present only when the alert definition comes from an alert template definition, otherwise it shouldn't exist no?
yup, the read-only checkbox should be visible for an alert definition, but not for an alert template...AND only when that definition is hooked up to a template.
supplemental - a related fix reported by Fady. The problem had to do with the fact that alert template conditions are not associated with a resource but a resource type. In our latest refactoring it looks like we handled this in alert condition update, but not removal. When we went to remove the conditions for an alert template we failed to find the associated Resource during the cache update. I added protection such that we don't event try to update the cache when removing a template condition, and also protected at he point of failure just in case we get there from some other code path. I made the changes in r1256. I was able to create and delete template w/ no resources, create a template with cascade and then remove it and see the cascade removal, and create a resource-level alert def and remove it.
Now everything works fine however I'll go a bit further to remove all the cascade checks from the code and test that it doesn't affect the functionality. A final step would be to remove the cascade button from the DefinitionForm and other locations if any.
Removed all cascading related features and implemented the read-only feature. Remove the cascading calls from the API
I tested this by Create an alert template on filesystem that will always be fired Go into one filesystem alert tab and check the read-only box for the alert i created with the template Go back to the alert template and edit it so that it will never fire Check the alerts. Before the edit of the template, alerts should be fired for all filesystems. After editing the template, only the filesystem whose read-only box is checked should continue to be fired. rev1304 found one minor bug that i have marked as 'depends on' this issue.
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-720 Imported an attachment (id=368885) This bug is related to RHQ-719 This bug incorporates RHQ-685