Bug 676756 - Quickly hitting "enable" followed by "disable" for a schedule item results in stack
Quickly hitting "enable" followed by "disable" for a schedule item results in...
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Core UI (Show other bugs)
4.0.0
Unspecified Unspecified
medium Severity medium (vote)
: ---
: ---
Assigned To: Charles Crouch
Mike Foley
:
Depends On:
Blocks: 731034 gwt-scheduling jon3 rhq41 rhq41-ui
  Show dependency treegraph
 
Reported: 2011-02-10 22:15 EST by Corey Welton
Modified: 2015-02-01 18:26 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-03 12:58:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Corey Welton 2011-02-10 22:15:25 EST
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-10 22:16:16 EST
Actually, it happens when you hit the same button twice -- accidentally double-clicking, etc.
Comment 2 Ian Springer 2011-08-22 13:43:06 EDT
Created attachment 519323 [details]
a patch that fixes this issue
Comment 3 Ian Springer 2011-08-22 15:23:03 EDT
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 15:30:48 EDT
verified quick-clicking on rows in  table, and more specifically on the repro steps.
Comment 6 Heiko W. Rupp 2013-09-03 12:58:48 EDT
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.