Bug 1015505

Summary: Gadget web: Delete of multiple pages causes NumberFormatException in JavaScript console
Product: [JBoss] JBoss Fuse Service Works 6 Reporter: Andrej Vano <avano>
Component: RT GovernanceAssignee: Eric Wittmann <eric.wittmann>
Status: CLOSED CURRENTRELEASE QA Contact: Andrej Vano <avano>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.0 GACC: atangrin, kconner, ldimaggi, soa-p-jira
Target Milestone: ER7   
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-06 15:25:31 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:

Description Andrej Vano 2013-10-04 12:11:37 UTC
Description of problem: 
Deleting pages in other order than "newest first" will cause JavaScript exception.
See steps to reproduce.

Version-Release number of selected component (if applicable):
6.0.0.ER4-5


How reproducible: 100%


Steps to Reproduce:
1. Create new pages with names for example "1", "2", "3" (in this order)
2. Delete page "1" and it will be deleted
3. Delete page "2", the page will be still present and the exception will be logged into javascript console
4. The page "2" is still present, but can't be accessed until the refresh of the web-console

Actual results:


Expected results:


Additional info:

Comment 2 Eric Wittmann 2013-10-07 14:47:53 UTC
The gadget server was tracking the (server-side) page ID of a tab using the index of that tab (it's position relative to other tabs).  This was problematic when a tab was deleted, because the mappings would de-synch.  The right way to fix this would be to store the page ID on an attribute in the UI itself, and pass that along when the user clicks the delete button for a tab.  However, the shortest path to fixing this was to simply update the mappings whenever a tab is deleted.

Since we're likely chucking gadget server in the future, in favor of some alternative UI, I went with the shortest path to completion.

Comment 5 Andrej Vano 2013-12-16 09:42:51 UTC
Hello,

verified on ER7-2