Bug 1205347 - Automate : Add duplicate fields in schema shows the wrong validation message
Summary: Automate : Add duplicate fields in schema shows the wrong validation message
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.4.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: GA
: 5.4.0
Assignee: Milan Zázrivec
QA Contact: Shveta
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-24 18:11 UTC by Shveta
Modified: 2015-06-16 12:54 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-16 12:54:37 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
two same fields at the bottom (208.47 KB, image/png)
2015-03-24 18:11 UTC, Shveta
no flags Details
Validation message (189.97 KB, image/png)
2015-03-24 18:11 UTC, Shveta
no flags Details
field "abcd" is added even after deleting (171.41 KB, image/png)
2015-03-24 18:12 UTC, Shveta
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1100 0 normal SHIPPED_LIVE CFME 5.4.0 bug fixes, and enhancement update 2015-06-16 16:28:42 UTC

Description Shveta 2015-03-24 18:11:30 UTC
Created attachment 1005928 [details]
two same fields at the bottom

Description of problem:


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


How reproducible:


Steps to Reproduce:
1. Automate - Explorer - Default domain
2. Edit the schema for class Request
3. Add "new_field" twice and save 
4. Validation message is shown "Name is already taken"
5. Delete one "new_field" and save again .
6. Validation message is shown" Name is already taken"
7. Delete the second "new_field" and save 
8. "new_field" is shown in the schema fields.

Actual results:


Expected results:
After deleting one duplicate field , schema should get saved .

Additional info:
5.4.0.0.13.20150319164909_f011a66

Comment 1 Shveta 2015-03-24 18:11:55 UTC
Created attachment 1005930 [details]
Validation message

Comment 2 Shveta 2015-03-24 18:12:58 UTC
Created attachment 1005931 [details]
field "abcd" is added even after deleting

Comment 4 Milan Zázrivec 2015-04-23 13:13:54 UTC
https://github.com/ManageIQ/manageiq/pull/2738

Comment 5 Milan Zázrivec 2015-04-24 07:18:30 UTC
FYI, same problem would show when adding new input parameters (again,
with identical names) to a class method. This needs to be verified as
a part of testing the fix as well.

Comment 6 CFME Bot 2015-04-27 16:06:56 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/50aaffe4f8917439475254f6f5f7e3cd6e2e0373

commit 50aaffe4f8917439475254f6f5f7e3cd6e2e0373
Author:     Milan Zazrivec <mzazrivec>
AuthorDate: Thu Apr 23 11:42:34 2015 +0200
Commit:     Milan Zazrivec <mzazrivec>
CommitDate: Mon Apr 27 17:14:26 2015 +0200

    Fix for addition of duplicate fields into automate class
    
    Adding new fields into an automate class needs also be done
    inside a transaction and raise an exception should an error
    occur (to be able to rollback nicely).
    
    Same logic applies to creating / updating a class method
    when adding new input parameters with identical name.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1205347

 vmdb/app/controllers/miq_ae_class_controller.rb    | 11 ++--
 .../controllers/miq_ae_class_controller_spec.rb    | 76 ++++++++++++++++++++++
 2 files changed, 83 insertions(+), 4 deletions(-)

Comment 8 Shveta 2015-04-29 22:24:01 UTC
Not fixed in 5.4.0.0.22.20150420163946_26004d1 
Will check in next build

Comment 9 Shveta 2015-05-12 21:39:06 UTC
Fixed in 5.4.0.0.26.20150511144816_f924bd4

Comment 11 errata-xmlrpc 2015-06-16 12:54:37 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


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