Bug 1203003

Summary: Only able to reorder service dialog elements one at a time
Product: Red Hat CloudForms Management Engine Reporter: Kevin Morey <kmorey>
Component: UI - OPSAssignee: Martin Hradil <mhradil>
Status: CLOSED ERRATA QA Contact: Dave Johnson <dajohnso>
Severity: high Docs Contact:
Priority: medium    
Version: 5.3.0CC: david.costakos, dclarizi, hkataria, jhardy, kmorey, mberube, mpovolny, obarenbo, sshveta
Target Milestone: GA   
Target Release: 5.4.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1205190 1207779 (view as bug list) Environment:
Last Closed: 2015-06-16 12:53:46 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:    
Bug Blocks: 1205190, 1207779    
Attachments:
Description Flags
test service dialog none

Description Kevin Morey 2015-03-17 21:28:48 UTC
Created attachment 1002958 [details]
test service dialog

Description of problem:
When reordering service dialog elements you can only order one element at a time else your changes are not reflected. The only work around today is to reorder an element then save the dialog, re-edit the dialog and make reorder another element and then check save again. 

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

How reproducible:
100%

Steps to Reproduce:
1. Import attached service dialog
2. Attempt to reorder element 1 to element 2 and then back again
3. click on save

Actual results:
your changes are not saved with the correct ordering of elements

Expected results:
your changes are correctly saved

Additional info:
see attached dialog

Comment 4 CFME Bot 2015-03-19 20:31:04 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/5e4fc47e9fcbdb404d1ce7aa3bd502ba83a9d50b

commit 5e4fc47e9fcbdb404d1ce7aa3bd502ba83a9d50b
Author:     Martin Hradil <mhradil>
AuthorDate: Wed Mar 18 08:56:44 2015 +0000
Commit:     Martin Hradil <mhradil>
CommitDate: Wed Mar 18 08:59:29 2015 +0000

    miqInitDashboardCols - replace sortupdate event handler, instead of just adding one
    
    this prevents request storms when miqInitDashboardCols gets called multiple times
    especially since it's called in reaction to that specific event, thus doubling the number of requests each time
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1203003

 vmdb/app/assets/javascripts/miq_application.js | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Comment 5 CFME Bot 2015-03-19 20:31:07 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/150412117f01df1343c4d3d56ffbc6a37d2cd2ca

commit 150412117f01df1343c4d3d56ffbc6a37d2cd2ca
Author:     Martin Hradil <mhradil>
AuthorDate: Wed Mar 18 10:27:12 2015 +0000
Commit:     Martin Hradil <mhradil>
CommitDate: Wed Mar 18 10:27:12 2015 +0000

    rewritten MiqAeCustomizationController#dialog_res_reorder to use ids instead of the original item order
    
    Backend code relied on original order (saved as part od DOM element id), which broke after any change.
    Using [:current][:tabs][pos] instead of [:new][:tabs][pos] would work, but reordering groups and fields would break if their tab got reordered first.
    
    Thus, this makes the code completely ignore the original order and use only ids.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1203003

 .../miq_ae_customization_controller/dialogs.rb     | 67 +++++++++++-----------
 1 file changed, 33 insertions(+), 34 deletions(-)

Comment 6 CFME Bot 2015-03-27 22:55:53 UTC
New commit detected on cfme/5.3.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=57e2e223c67515e649bbcef9ff0c999d10784b2b

commit 57e2e223c67515e649bbcef9ff0c999d10784b2b
Author:     Martin Hradil <mhradil>
AuthorDate: Tue Mar 24 12:44:11 2015 +0000
Commit:     Martin Hradil <mhradil>
CommitDate: Tue Mar 24 12:44:11 2015 +0000

    miqInitDashboardCols - replace sortupdate event handler, instead of just adding one
    
    this prevents request storms when miqInitDashboardCols gets called multiple times
    especially since it's called in reaction to that specific event, thus doubling the number of requests each time
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1203003
    
    (cherry-picked from 5e4fc47e9fcbdb404d1ce7aa3bd502ba83a9d50b, except by hand because different filename and $j)

 vmdb/app/assets/javascripts/cfme_application.js | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Comment 7 CFME Bot 2015-03-27 22:55:58 UTC
New commit detected on cfme/5.3.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=1af0111ae83cb97f86c32f9ac9755ba919eba932

commit 1af0111ae83cb97f86c32f9ac9755ba919eba932
Author:     Martin Hradil <mhradil>
AuthorDate: Wed Mar 18 10:27:12 2015 +0000
Commit:     Martin Hradil <mhradil>
CommitDate: Tue Mar 24 12:46:08 2015 +0000

    rewritten MiqAeCustomizationController#dialog_res_reorder to use ids instead of the original item order
    
    Backend code relied on original order (saved as part od DOM element id), which broke after any change.
    Using [:current][:tabs][pos] instead of [:new][:tabs][pos] would work, but reordering groups and fields would break if their tab got reordered first.
    
    Thus, this makes the code completely ignore the original order and use only ids.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1203003
    (cherry picked from commit 150412117f01df1343c4d3d56ffbc6a37d2cd2ca)

 .../miq_ae_customization_controller/dialogs.rb     | 67 +++++++++++-----------
 1 file changed, 33 insertions(+), 34 deletions(-)

Comment 9 Shveta 2015-04-20 21:56:26 UTC
Fixed.
Verified in 5.4.0.0.19.20150410165622_ad23806

Comment 11 errata-xmlrpc 2015-06-16 12:53:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-1100.html