Bug 609456

Summary: Unset checkbox is non affective on Command line options and Environment variables text field
Product: [Other] RHQ Project Reporter: Sudhir D <sdharane>
Component: AlertsAssignee: John Sanda <jsanda>
Status: CLOSED CURRENTRELEASE QA Contact: Ian Springer <ian.springer>
Severity: high Docs Contact:
Priority: high    
Version: 3.0.0CC: ccrouch, ian.springer, jsanda
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: 2.4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-08-12 16:53:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 601949    

Description Sudhir D 2010-06-30 11:17:52 UTC
Description of problem:
The Unset Checkbox that is present against Command line options in Alert Notification and the one present against Environment Variables under script is non affective. If I set a value and then click save and later try to unset by checking the check box, the old value is still retained and the check from the check box is not saved.

Version-Release number of selected component (if applicable):
jon-server-2.4.0.GA_QA Build# 43.

How reproducible:
Always

Steps to Reproduce:
1.Create a new alert definition.
2.Click on Edit for the Alert Notification.
3.On the Alert notification page, click on Add New. Select the Alert sender
type as Resource Operations.
4.Select the resource selection mode as Relative Resource. 
5.Click Save
6.Select Start search from as "JBoss AS Server"
7.Click Save.
8.Select Then Filter by as "Script"
9.Provide the name of the script that should be executed upon meeting the alert
condition.
10.Select operation name as "Execute Script"
11.Click Save.
12.Uncheck the Unset for Command line arguments and enter the value that needs
to be passed.
13.Click Save.
14.Now Check the Unset and click save.
  
Actual results:
Check the unset check box, the old value is still retained and the check from the check box is not saved.

Expected results:
Checking back the unset should unset the value.

Additional info:

Comment 1 Ian Springer 2010-07-15 01:58:26 UTC
This was actually two separate issues:

1) prepareInputsForSubmission() function in rhq.js was not including textarea elements (i.e. for longString props) in the inputs that it prepared for submission; this issue affected all textarea inputs on all config pages throughout RHQ

2) missing call to prepareInputsForSubmission() JS function upon submission of form on update alert sender config page (/rhq/common/alert/notification/details.xhtml).

Both issues are fixed by commit a3a6c3c, which has been pushed to the release-3.0.0 branch.

Comment 2 Sudhir D 2010-07-16 08:28:09 UTC
Verified the scenario with jon-server-2.4.0.GA_QA.zip build# 65. The unset is working as expected. 

Marking this bug as verified.

Comment 3 Charles Crouch 2010-07-16 17:04:46 UTC
This second bug meant that it was impossible to unset textarea fields in configuration components that occurred anywhere in the UI.

Comment 4 Corey Welton 2010-08-12 16:53:02 UTC
Mass-closure of verified bugs against JON.