Description of problem: If user saves an alert notification which runs a JBoss AS descendent script, and afterwards tries to edit it, s/he gets a FK constraint violation. Version-Release number of selected component (if applicable): How reproducible: Every time Steps to Reproduce: 1. Create an alert for a jboss as server, i.e., RHQ 2. Type: Resource Operations Resource Selection Mode: Relative Resource Start Search from: JBoss AS Server Then Filter By: Script 3. Enter "porbe.sh" in the box next to "Script" 4. Operation name: Execute script 5. Command Line arguments: keep "Unset" checked. 6. Return to the box which contains "porbe.sh". change this to "probe.sh" 7. hit save Actual results: Failed to save alert notification Cause: javax.ejb.EJBException:javax.persistence.EntityExistsException: org.hibernate.exception.ConstraintViolationException: could not execute update query -> javax.persistence.EntityExistsException:org.hibernate.exception.ConstraintViolationException: could not execute update query -> org.hibernate.exception.ConstraintViolationException:could not execute update query -> org.postgresql.util.PSQLException:ERROR: update or delete on table "rhq_config" violates foreign key constraint "rhq_alert_notification_extra_config_id_fkey" on table "rhq_alert_notification" Detail: Key (id)=(13618) is still referenced from table "rhq_alert_notification".[SQLException=ERROR: update or delete on table "rhq_config" violates foreign key constraint "rhq_alert_notification_extra_config_id_fkey" on table "rhq_alert_notification" Detail: Key (id)=(13618) is still referenced from table "rhq_alert_notification".] Expected results: No errors. Additional info:
workaround is to remove busted notification and recreate.
commit f4223c6c628f5b5788e804a0c7f382cfea121cdd Author: Joseph Marques <joseph> Date: Fri Jun 11 14:01:40 2010 -0400 BZ-602788: fix FK constaint violation when editing an alert notification with operation arguments * instead of deleting and recreating the extraConfiguration object, just merge properties changes into it * if user changes selection mode, need to null out the extraConfiguration
Blocked by 607548
QA Verified.
Mass-closure of verified bugs against JON.