Project

General

Profile

Bug #32026

Saving invalid cloned role ends up with Internal server error

Added by Ondřej Ezr 8 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Users, Roles and Permissions
Target version:
-
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1934427

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

How reproducible:
always

Steps to Reproduce:
1. In Foreman 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:


Related issues

Related to Foreman - Bug #21545: Role cloning treats taxonomies differently in UI and APIClosed

Associated revisions

Revision d5301b08 (diff)
Added by Ondřej Ezr 8 months ago

Fixes #32026 - cloned role throws error 500 if invalid

In e61362d1a103b4fbd79c838a6bb6f01986ab02a9 we've accidently forgot about the create action, but now
save of invalid role would have end up with 500 error.

This moves to using `cloned_from_id` instead of `@original_role` as
source of the original role id as this information is easier to pass to
the form.

History

#1 Updated by Ondřej Ezr 8 months ago

  • Triaged changed from No to Yes
  • Target version set to 2.4.1
  • Category set to Users, Roles and Permissions
  • Subject changed from Saving invalid cloned role ends up with 500. to Saving invalid cloned role ends up with Internal server error

#2 Updated by Ondřej Ezr 8 months ago

  • Found in Releases 2.3.3 added

#3 Updated by The Foreman Bot 8 months ago

  • Assignee set to Ondřej Ezr
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/8369 added

#4 Updated by Ondřej Ezr 8 months ago

  • Related to Bug #21545: Role cloning treats taxonomies differently in UI and API added

#5 Updated by The Foreman Bot 8 months ago

  • Fixed in Releases 2.5.0 added

#6 Updated by Ondřej Ezr 8 months ago

  • Status changed from Ready For Testing to Closed

#7 Updated by Tomer Brisker 8 months ago

  • Fixed in Releases 2.4.0 added
  • Fixed in Releases deleted (2.5.0)

#8 Updated by Tomer Brisker 8 months ago

  • Target version deleted (2.4.1)

Also available in: Atom PDF