Bug 1690889

Summary: Cannot create a group after validation message 'Description is not unique'
Product: Red Hat CloudForms Management Engine Reporter: Hilda Stastna <hstastna>
Component: UI - OPSAssignee: Hilda Stastna <hstastna>
Status: CLOSED CURRENTRELEASE QA Contact: Tasos Papaioannou <tpapaioa>
Severity: medium Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: medium    
Version: 5.9.9CC: bmidwood, dmetzger, hkataria, lavenel, mpovolny, obarenbo, simaishi, tpapaioa
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.11.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1712440 (view as bug list) Environment:
Last Closed: 2019-12-13 15:16:11 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:
Bug Depends On:    
Bug Blocks: 1712440    
Attachments:
Description Flags
Step 4 and also the actual result after step 5
none
Expected result none

Description Hilda Stastna 2019-03-20 12:05:33 UTC
Created attachment 1546051 [details]
Step 4 and also the actual result after step 5

Description of problem:
Cannot create a group for the second time, after displaying a validation message 'Description is not unique within region 0'.

Version-Release number of selected component (if applicable):
latest 5.9, also 5.10

How reproducible:
always

Steps to Reproduce:
1. Go to Configuration > Access Control > Groups accordion
2. Configuration > Add a new Group, create a group
3. Try to create another group with the same description as from step 2
   => error flash message occurs
4.Follow the message and change the description of the new group to be unique, 5. Press Add button

Actual results:
Nothing happens in the UI, the page remains the same, error:

[----] I, [2019-03-19T17:28:55.994747 #11522:2ad94de6c2f0]  INFO -- : Started POST "/ops/rbac_group_edit?button=add" for ::1 at 2019-03-19 17:28:55 +0100
[----] I, [2019-03-19T17:28:56.033217 #11522:2ad94de6c2f0]  INFO -- : Processing by OpsController#rbac_group_edit as JS
[----] I, [2019-03-19T17:28:56.033346 #11522:2ad94de6c2f0]  INFO -- :   Parameters: {"button"=>"add"}
[----] F, [2019-03-19T17:28:56.045202 #11522:2ad94de6c2f0] FATAL -- : Error caught: [NoMethodError] undefined method `empty?' for nil:NilClass
/home/hstastna/manageiq/manageiq-ui-classic/app/controllers/ops_controller/ops_rbac.rb:1377:in `rbac_group_validate?'
/home/hstastna/manageiq/manageiq-ui-classic/app/controllers/ops_controller/ops_rbac.rb:674:in `rbac_edit_save_or_add'
/home/hstastna/manageiq/manageiq-ui-classic/app/controllers/ops_controller/ops_rbac.rb:92:in `rbac_group_edit'

Expected results:
Group should be saved with no problems, after changing the description to be different to the already existing groups' descriptions, flash message about success should appear.

Additional info:

Comment 2 Hilda Stastna 2019-03-20 12:06:10 UTC
Created attachment 1546052 [details]
Expected result

Comment 4 Hilda Stastna 2019-03-20 12:08:58 UTC
fixing: https://github.com/ManageIQ/manageiq-ui-classic/pull/5354

Comment 5 Tasos Papaioannou 2019-05-20 16:32:37 UTC
Verified on 5.11.0.4.