Bug 1292791 - Schema fields reverse the order when added
Summary: Schema fields reverse the order when added
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.5.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: GA
: 5.6.0
Assignee: mkanoor
QA Contact: Dmitry Misharov
URL:
Whiteboard: automate:ui
Depends On:
Blocks: 1293740
TreeView+ depends on / blocked
 
Reported: 2015-12-18 11:13 UTC by Milan Falešník
Modified: 2016-11-16 16:11 UTC (History)
6 users (show)

Fixed In Version: 5.6.0.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1293740 (view as bug list)
Environment:
Last Closed: 2016-06-29 15:22:33 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1348 0 normal SHIPPED_LIVE CFME 5.6.0 bug fixes and enhancement update 2016-06-29 18:50:04 UTC

Description Milan Falešník 2015-12-18 11:13:02 UTC
Description of problem:
When you add schema fields to a class and save them, the order is reversed. This is most prominent on first time save, then all subsequent additions of fields put the fields in the beginning of the schema on save.

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

How reproducible:
always

Steps to Reproduce:
1. Create a new class and open the schema editor
2. Create eg. attributes: a, b, c. Save the schema.
3. After save you see the order is c, b, a (I would expect a, b, c)
4. So, edit the sequence of the schema so it is a, b, c as we would like it to be in reality
5. Open the editor again and add a field d. The fields are always added at the end in the editor, but after you save, the order is d, a, b, c (I would expect a, b, c, d)

Additional info:
Not a showstopper, one just has to go to the sequence editor after schema editing to fix the issue which can get repetitive.

Comment 3 CFME Bot 2015-12-22 21:05:54 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/679a6ebebb506540a5c4709e9ce6f01cadaceda1

commit 679a6ebebb506540a5c4709e9ce6f01cadaceda1
Author:     Madhu Kanoor <mkanoor>
AuthorDate: Mon Dec 21 15:19:14 2015 -0500
Commit:     Madhu Kanoor <mkanoor>
CommitDate: Mon Dec 21 17:27:54 2015 -0500

    Priority wasn't being set for new fields
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1292791
    
    The priority wasn't being set for the newly added fields, before
    being saved the fields were sorted and the fields with nil priority
    floated to the top. Set the fields to the highest priority if they
    are new

 app/controllers/miq_ae_class_controller.rb       |  4 ++-
 spec/controllers/miq_ae_class_controller_spec.rb | 31 ++++++++++++++++++++++++
 2 files changed, 34 insertions(+), 1 deletion(-)

Comment 4 CFME Bot 2015-12-23 16:31:24 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=d1715b8ec4be883d025975571fb913b31eaf0799

commit d1715b8ec4be883d025975571fb913b31eaf0799
Author:     Madhu Kanoor <mkanoor>
AuthorDate: Mon Dec 21 15:19:14 2015 -0500
Commit:     Madhu Kanoor <mkanoor>
CommitDate: Wed Dec 23 10:00:12 2015 -0500

    Priority wasn't being set for new fields
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1292791
    
    The priority wasn't being set for the newly added fields, before
    being saved the fields were sorted and the fields with nil priority
    floated to the top. Set the fields to the highest priority if they
    are new

 app/controllers/miq_ae_class_controller.rb       |  4 ++-
 spec/controllers/miq_ae_class_controller_spec.rb | 31 ++++++++++++++++++++++++
 2 files changed, 34 insertions(+), 1 deletion(-)

Comment 6 Dmitry Misharov 2016-04-18 10:03:22 UTC
Verified fixed in 5.6.0.1-beta2.20160413141124_e25ac0e. The sequence of the schema fields has the right order.

Comment 8 errata-xmlrpc 2016-06-29 15:22:33 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://access.redhat.com/errata/RHBA-2016:1348


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