Skip to content

Check if description is nil before calculating length

Hinam Mehra requested to merge 474752-fix-create-member-role-form into master

What does this MR do and why?

  • When custom roles was introduced, description field was optional
  • In recent updates, it was made a mandatory field in the front-end. Customers who created custom roles before this change are unable to edit the role because description field is nil.
  • This MR lets fixes that bug.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Before After
before-custom-role-edit after-custom-role-edit

How to set up and validate locally

  1. Make sure you have an ultimate license and have SaaS mode turned on.
  2. Pick any group that you are an owner of, and create a custom role for that group in the rails console:
MemberRole.create(base_access_level: 10, name: "Custom role", namespace_id: <GROUP_ID>)
  1. Then navigate to /groups/<GROUP>/-/settings/roles_and_permissions and try to edit that custom role.

Related to #474752 (closed)

Merge request reports

Loading