Bug 1205347
Summary: | Automate : Add duplicate fields in schema shows the wrong validation message | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat CloudForms Management Engine | Reporter: | Shveta <sshveta> | ||||||||
Component: | Automate | Assignee: | Milan Zázrivec <mzazrivec> | ||||||||
Status: | CLOSED ERRATA | QA Contact: | Shveta <sshveta> | ||||||||
Severity: | low | Docs Contact: | |||||||||
Priority: | low | ||||||||||
Version: | 5.4.0 | CC: | cpelland, jhardy, mkanoor, obarenbo, tcarlin, tfitzger | ||||||||
Target Milestone: | GA | ||||||||||
Target Release: | 5.4.0 | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Whiteboard: | |||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||
Doc Text: | Story Points: | --- | |||||||||
Clone Of: | Environment: | ||||||||||
Last Closed: | 2015-06-16 12:54:37 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: |
|
Created attachment 1005930 [details]
Validation message
Created attachment 1005931 [details]
field "abcd" is added even after deleting
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. 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(-) Not fixed in 5.4.0.0.22.20150420163946_26004d1 Will check in next build Fixed in 5.4.0.0.26.20150511144816_f924bd4 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 |
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