Bug 1934427

Summary: cloning a role without supplying name leads to undefined method `id' for nil:NilClass
Product: Red Hat Satellite Reporter: Peter Ondrejka <pondrejk>
Component: Users & RolesAssignee: Ondřej Ezr <oezr>
Status: CLOSED ERRATA QA Contact: Danny Synk <dsynk>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.9.0CC: mhulan, oezr
Target Milestone: 6.10.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-16 14:10:21 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:

Description Peter Ondrejka 2021-03-03 08:49:57 UTC
Description of problem:

Error message displayed when cloning a role without supplying name: 
Oops, we're sorry but something went wrong undefined method `id' for nil:NilClass

Version-Release number of selected component (if applicable):
Sat 6.9 snap 15

How reproducible:
always

Steps to Reproduce:
1. In Satellite UI: Administer > Roles
2. Pick a role, select Clone from the dropdown
3. Don't input any information in the form and click Submit

Actual results:
Red box with the aforementioned error

Expected results:
Information about the required field

Additional info:

Comment 1 Brad Buckingham 2021-03-04 15:14:12 UTC
Is this a regression from 6.8?

Comment 2 Ondřej Ezr 2021-03-06 00:40:41 UTC
Created redmine issue https://projects.theforeman.org/issues/32026 from this bug

Comment 3 Ondřej Ezr 2021-03-06 01:03:35 UTC
This was introduced in BZ#1488908 so it is in from 6.6.
It can be quite annoying, but probably not a show stopper. I filed a upstream PR, if we get it in fast, I'd suggest 6.9, if not I'd not push it.

Comment 4 Bryan Kearney 2021-03-06 04:06:21 UTC
Upstream bug assigned to oezr

Comment 5 Bryan Kearney 2021-03-06 04:06:23 UTC
Upstream bug assigned to oezr

Comment 6 Bryan Kearney 2021-03-08 16:06:29 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/32026 has been resolved.

Comment 8 Danny Synk 2021-06-01 18:00:21 UTC
Steps to Test:

1. Deploy Satellite 6.10, snap 2.
2. In the webUI, navigate to Administer > Roles.
3. Select the "Clone" option from the dropdown menu in the "Actions" column for any role.
4. When the "Create Role" page loads, click the "Submit" button without entering any information in the form.

Expected Results:
A descriptive error message is displayed.

Actual Results:
The required "Name" input field is outlined in red, and the message "can't be blank" is displayed in red text next to the input field.

Verified on Satellite 6.10, snap 2 (foreman-2.5.0-0.8.rc3.el7sat.noarch).

Comment 11 errata-xmlrpc 2021-11-16 14:10:21 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 (Moderate: Satellite 6.10 Release), 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://access.redhat.com/errata/RHSA-2021:4702