Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 956067

Summary: Page deletion confirmation alert is displayed, even though no page is selected
Product: [Retired] JBoss BPMS Platform 6 Reporter: Jan Hrcek <jhrcek>
Component: BAMAssignee: David Gutierrez <dgutierr>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Hrcek <jhrcek>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0.0CC: rrajasek, rzhang
Target Milestone: DR4   
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Page deletion checkings are out of order. Consequence: Users may get confused by the feedback given by the application. Fix: Change the order of the verifications. Result: The application behaviour is now easier to understand.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 20:11:04 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:
Attachments:
Description Flags
Out of order alerts none

Description Jan Hrcek 2013-04-24 09:05:48 UTC
Created attachment 739342 [details]
Out of order alerts

Description of problem:
	When deleting pages in "General configuration" section of dashbuilder, if you have no page to delete selected and you click "Clear" button the following alert is displayed: "Are you sure you want to delete page?" (1) - you click OK for this alert and another alert pops up: "A page selected is needed" (2). These alerts are clearly out of order. When no page for deletion is selected, only alert 2 should be displayed.


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

How reproducible:
        Always
	In my case:Fedora 18, browsers: both Firefox 19, Google Chrome 26

Steps to Reproduce:
1. Download dashboard-builder from github and run quickstart demo as described in the "Quickstart" section
	cd dashboard-builder/scripts
	./buildandrun_h2.sh
2. Browse to http://localhost:8080/dashbuilder/ and login with root/root
3. Using administration menu at the top go to "General configuration" (using gearwheel icon)

4. Expand: Workspace > Showcase > Sections

5. Click the "Clear" button (trash can - element with id="action_delete_section") without actually selecting a page to delete.

Actual results:
	1) First alert "Are you sure you want to delete page?" is displayed
	2) You click OK
	3) Second alert "A page selected is needed"

Expected results:
	Only second alert should be displayed: "A page selected is needed", because user didn't select a page!

Comment 1 David Gutierrez 2013-05-03 15:58:33 UTC
Order of the checking changes as suggested.

Github commit: https://github.com/droolsjbpm/dashboard-builder/commit/5ccabf932d0d03697223563473e6b78e677036fe

Comment 2 Jan Hrcek 2013-06-10 12:52:30 UTC
QA: Ok, the issue is fixed. When trying to delete a page without a page selected, the alert with message "No page selected" is displayed. Verified with dashbuilder build DR5 deployed on EAP 6.1 GA