Bug 825173

Summary: Schedules cannot be deleted
Product: [Other] RHQ Project Reporter: Lukas Krejci <lkrejci>
Component: Core UIAssignee: Jay Shaughnessy <jshaughn>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: high Docs Contact:
Priority: urgent    
Version: 4.4CC: hrupp, jsanda, jshaughn, lkrejci, skondkar, vlad.craciunoiu
Target Milestone: ---   
Target Release: JON 3.1.0   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 824778 Environment:
Last Closed: 2013-09-03 15:09:36 UTC Type: Bug
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: 824778    
Bug Blocks: 782579    

Description Lukas Krejci 2012-05-25 09:48:01 UTC
+++ This bug was initially created as a clone of Bug #824778 +++

Description of problem:
A schedule created in RHQ Resource/Operations/Schedules once created cannot be deleted.

Version-Release number of selected component (if applicable):
4.4

How reproducible:
Always

Steps to Reproduce:
1. In the resource browser select a JBoss server (or anything else, a queue etc).
2. Go to Operations/Schedules/New and create a schedule.
3. Then try to delete it
  
Actual results:
The message in Message center is: "Failure in datasource while processing REMOVE request.". Stack trace from Message Center added below to additional info.

Expected results:
The schedule should be successfully deleted.

Additional info:


Detail :	

java.lang.ClassCastException:null
--- STACK TRACE FOLLOWS ---
null
   at Unknown.java_lang_ClassCastException_ClassCastException__V(Unknown Source)
   at Unknown.com_google_gwt_lang_Cast_dynamicCast__Ljava_lang_Object_2ILjava_lang_Object_2(Unknown Source)
   at Unknown.org_rhq_enterprise_gui_coregui_client_inventory_common_detail_operation_schedule_AbstractOperationScheduleDataSource_$copyValues__Lorg_rhq_enterprise_gui_coregui_client_inventory_common_detail_operation_schedule_AbstractOperationScheduleDataSource_2Lcom_smartgwt_client_data_Record_2Lorg_rhq_core_domain_operation_bean_OperationSchedule_2(Unknown Source)
   at Unknown.org_rhq_enterprise_gui_coregui_client_inventory_resource_detail_operation_schedule_ResourceOperationScheduleDataSource_executeRemove__Lcom_smartgwt_client_data_Record_2Lcom_smartgwt_client_data_DSRequest_2Lcom_smartgwt_client_data_DSResponse_2V(Unknown Source)
   at Unknown.org_rhq_enterprise_gui_coregui_client_util_RPCDataSource_transformRequest__Lcom_smartgwt_client_data_DSRequest_2Ljava_lang_Object_2(Unknown Source)
   at Unknown.anonymous(Unknown Source)
   at Unknown.com_google_gwt_core_client_impl_Impl_apply__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(Unknown Source)
   at Unknown.com_google_gwt_core_client_impl_Impl_entry0__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(Unknown Source)
   at Unknown.anonymous(Unknown Source)
   at Unknown.isc_DataSource_getServiceInputs(Unknown Source)
   at Unknown.isc_DataSource_sendDSRequest(Unknown Source)
   at Unknown.isc_DataSource_performDSOperation(Unknown Source)
   at Unknown.isc_Canvas_deleteRecords(Unknown Source)
   at Unknown.isc_Canvas_removeSelectedData(Unknown Source)
   at Unknown.com_smartgwt_client_widgets_grid_ListGrid_$removeSelectedData__Lcom_smartgwt_client_widgets_grid_ListGrid_2Lcom_smartgwt_client_data_DSCallback_2Lcom_smartgwt_client_data_DSRequest_2V(Unknown Source)
   at Unknown.org_rhq_enterprise_gui_coregui_client_components_table_Table_$deleteSelectedRecords__Lorg_rhq_enterprise_gui_coregui_client_components_table_Table_2Lcom_smartgwt_client_data_DSRequest_2V(Unknown Source)
   at Unknown.org_rhq_enterprise_gui_coregui_client_inventory_common_detail_operation_schedule_AbstractOperationScheduleListView$2_executeAction___3Lcom_smartgwt_client_widgets_grid_ListGridRecord_2Ljava_lang_Object_2V(Unknown Source)
   at Unknown.org_rhq_enterprise_gui_coregui_client_components_table_Table$2$1_execute__Ljava_lang_Boolean_2V(Unknown Source)
   at Unknown.anonymous(Unknown Source)
   at Unknown.isc_c_Class_fireCallback(Unknown Source)
   at Unknown.isc_Class_fireCallback(Unknown Source)
   at Unknown.isc_c_Class_fireCallback(Unknown Source)
   at Unknown.isc_c_Timer__fireTimeout(Unknown Source)
   at Unknown.anonymous(Unknown Source)
   at Unknown.anonymous(Unknown Source)

Comment 1 Jay Shaughnessy 2012-05-25 17:46:36 UTC
release/jon3.1.x commit 5f76c5aaebdb63374c48a8bcd0e96a0d611891c5
    This was odd. (nod to lkrejci for doing original analysis)
    SmartGWT for whatever reason seemd to be getting confused
    as to what sort of object that SubjectRecord was. It seems to stem from
    setting a ListGrid "object" as an attribute on a ListGridRecord. Perhaps
    under the covers it is sometimes a Java object and sometimes a javascript
    object. Either way, remove the use of it completely and just use simple
    attributes to store the subject name and id.  It adds an attribute but
    overall simplfies things (and, as a bonus, works).

    cherry pick of master commit 9cb619f40a3cc7609989e9890a1da1f2c8b95273

Comment 2 Jay Shaughnessy 2012-05-25 17:49:13 UTC
Test Notes:
Ensure add and remove are working, as well as the list view "owner" column.
Also, test the resource *and* group schedule levels.

Comment 3 Sunil Kondkar 2012-06-05 10:21:18 UTC
Verified on Version: 3.1.0.CR2 Build Number: 05c820d:aaa5a79

Verified adding, removing the schedules on resources, compatible groups and autogroups. The 'Owner' column displays correct name in list view. Verified deleting multiple schedules on resources and groups.

Comment 4 Heiko W. Rupp 2013-09-03 15:09:36 UTC
Bulk closing of old issues in VERIFIED state.