Bug 1659947 - Flash message is not proper when add Orchestration Template(Heat,Azure,VNF,vApp) with same content or name blank
Summary: Flash message is not proper when add Orchestration Template(Heat,Azure,VNF,vA...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.10.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.10.2
Assignee: Lucy Fu
QA Contact: Niyaz Akhtar Ansari
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-17 09:20 UTC by Niyaz Akhtar Ansari
Modified: 2019-02-19 15:05 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-19 15:05:06 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
duplicate content (129.19 KB, image/png)
2018-12-17 09:20 UTC, Niyaz Akhtar Ansari
no flags Details
name blank error (128.91 KB, image/png)
2018-12-17 09:23 UTC, Niyaz Akhtar Ansari
no flags Details

Description Niyaz Akhtar Ansari 2018-12-17 09:20:02 UTC
Created attachment 1515027 [details]
duplicate content

Description of problem:


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

How reproducible:
100%

Steps to Reproduce:
1.Add a new Orchestration Template(any Heat,Azure,VNF,vApp)
2.Again Add a another new Orchestration Template(Heat,Azure,VNF,vApp) with duplicate content[1] 


Actual results:
duplicated content error validation flash message is not proper while adding  
Orchestration Template with same content.
error message -> Error during 'Orchestration Template creation': Validation failed: ManageIQ::Providers::Azure::CloudManager::OrchestrationTemplate: Md5 of content already exists (content must be unique)


Expected results:
validation flash message should be like this => 
"Error during 'Orchestration Template creation': Validation failed: Md5 of content already exists (content must be unique)"

Additional info:
Also It show flash when we add Orchestration Template(Heat,Azure,VNF,vApp) with same name.

Comment 2 Niyaz Akhtar Ansari 2018-12-17 09:23:06 UTC
Created attachment 1515028 [details]
name blank error

Comment 3 Tina Fitzgerald 2018-12-17 22:23:07 UTC
Hi Lucy,

Could you look into this issue?

The UI code
https://github.com/ManageIQ/manageiq-ui-classic/blob/master/app/controllers/catalog_controller.rb#L1160

Calls this method:
https://github.com/ManageIQ/manageiq/blob/master/app/models/orchestration_template.rb#L156

Let me know if you have any questions.

Thanks,
Tina

Comment 4 Lucy Fu 2019-01-21 16:57:44 UTC
error message -> Error during 'Orchestration Template creation': Validation failed: ManageIQ::Providers::Azure::CloudManager::OrchestrationTemplate: Md5 of content already exists (content must be unique)

The above error message contains 3 parts.
1. Error during 'Orchestration Template creation':
  This comes from UI.

2. Validation failed: ManageIQ::Providers::Azure::CloudManager::OrchestrationTemplate: Md5
  This comes from Rails which tells the object class and attribute that fails the validation.

3. of content already exists (content must be unique)
  This comes from backend model.

We can't change the error message from Rails.

This BZ can be closed.


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