Bug 676756 - Quickly hitting "enable" followed by "disable" for a schedule item results in stack
Summary: Quickly hitting "enable" followed by "disable" for a schedule item results in...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Core UI
Version: 4.0.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Charles Crouch
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: 731034 gwt-scheduling jon3 rhq41 rhq41-ui
TreeView+ depends on / blocked
 
Reported: 2011-02-11 03:15 UTC by Corey Welton
Modified: 2015-02-01 23:26 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-09-03 16:58:48 UTC
Embargoed:


Attachments (Terms of Use)
a patch that fixes this issue (7.66 KB, patch)
2011-08-22 17:43 UTC, Ian Springer
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 732048 0 medium CLOSED Quick/Excessive clicking in Drift UI 2021-02-22 00:41:40 UTC

Internal Links: 732048

Description Corey Welton 2011-02-11 03:15:25 UTC
Description of problem:

Probably a minor nit, but a stacktrace is thrown when user hits the 'enable' button and quickly hits the 'disable' button before the page reloads.


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


How reproducible:


Steps to Reproduce:
1.  $resource > Monitoring > Schedules
2.  Highlight/select a resource
3.  Hit the "Enable" button, and quickly -- before the page refreshes -- hit the "Disable" button
  
Actual results:

Message Center :	
Failed to disable the collection of [0] metrics for resource with ID [10001]. The metrics were: [[]]
Severity :	
Error
	
Time :	
Thu 10 Feb 2011 10:10:03 PM EST
Detail :
java.lang.RuntimeException:javax.ejb.EJBException:java.lang.IllegalArgumentException: org.hibernate.hql.ast.QuerySyntaxException: unexpected end of subtree [UPDATE org.rhq.core.domain.measurement.MeasurementSchedule SET enabled = false WHERE id IN ( SELECT measurementschedule.id FROM org.rhq.core.domain.measurement.MeasurementSchedule measurementschedule WHERE ( measurementschedule.resource.id IN ( 10001 ) AND measurementschedule.definition.id IN ( ) ) ) ] -> java.lang.IllegalArgumentException:org.hibernate.hql.ast.QuerySyntaxException: unexpected end of subtree [UPDATE org.rhq.core.domain.measurement.MeasurementSchedule SET enabled = false WHERE id IN ( SELECT measurementschedule.id FROM org.rhq.core.domain.measurement.MeasurementSchedule measurementschedule WHERE ( measurementschedule.resource.id IN ( 10001 ) AND measurementschedule.definition.id IN ( ) ) ) ] -> org.hibernate.hql.ast.QuerySyntaxException:unexpected end of subtree [UPDATE org.rhq.core.domain.measurement.MeasurementSchedule SET enabled = false WHERE id IN ( SELECT measurementschedule.id FROM org.rhq.core.domain.measurement.MeasurementSchedule measurementschedule WHERE ( measurementschedule.resource.id IN ( 10001 ) AND measurementschedule.definition.id IN ( ) ) ) ]


Expected results:
Perhaps one/both button(s) should be disabled once either of them is hit?

Additional info:

Similar thing occurs when the reverse behaviour is taken (disable, enable)

Comment 1 Corey Welton 2011-02-11 03:16:16 UTC
Actually, it happens when you hit the same button twice -- accidentally double-clicking, etc.

Comment 2 Ian Springer 2011-08-22 17:43:06 UTC
Created attachment 519323 [details]
a patch that fixes this issue

Comment 3 Ian Springer 2011-08-22 19:23:03 UTC
Commits 1f2e89b and 4c29315 to master should fix this issue as well as prevent similar issues on all list views in the app that extend the Table class (which is 95% of the list views in the app).

The new behavior is as follows:

When the user clicks any of the action buttons in a table's footer, including the Refresh button, that button and all other buttons in the footer will be disabled until either the user cancels the action or the action completes, at which point buttons will be re-enabled as appropriate.

To QA this fix, try quick clicking on action buttons on the schedules list view, as well as a bunch of other list views in the app. Verify that the buttons are disabled when you click on one of them but also that they get re-enabled when you either cancel the action or the action completes.

Comment 4 Mike Foley 2011-08-22 19:30:48 UTC
verified quick-clicking on rows in  table, and more specifically on the repro steps.

Comment 6 Heiko W. Rupp 2013-09-03 16:58:48 UTC
Bulk closing of old issues that are in VERIFIED state.


Note You need to log in before you can comment on or make changes to this bug.