Created attachment 1232311 [details]
Description of problem:
In the Automate Class Schema when duplicate entries are added
there is no error message from the UI.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Edit a Automate class schema
2. Add a duplicate entry, same name, type, datatype
3. Hit the Save Button
The UI doesn't display error messages.
In the evm.log we see the error message
[2016-12-15T14:25:18.986768 #3778:3fed1c1ed630] ERROR -- : MIQ(miq_ae_class_controlle r-update_fields): Error during 'save': Name has already been taken
The UI should display the "Name has already been taken"
Removing div_num from flash_msg_div in 52aa32109ba182b3262a80f9c3899ab35d15de04 from several files from miq_ae_class view files is causing this issue. Can you please look into this.
Maybe one solution is to have only single flash_msg_div in the DOM rather than having it on each tab individually. We can discuss if needed.
Harpreet: the form is massively broken. When editing, class_fields_div is created inside class_fields div, each row has at least 2 elements with duplicate DOM ID and yes, also flash_messages are present multiple times on the screen.
The structure of the form needs fixing before the flash can be fixed.
Verified in 184.108.40.206.
It is not possible to add duplicate schema fields into the class schema definition.
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.