Skip to content

Fix error on Epic close and reopen action

Rajan Mistry requested to merge ramistry-fix-close-epic-error into master

What does this MR do and why?

badgeState is initialised in created hook of merge_requests/components/merge_request_header.vue#L70 component. Thus, the updateStatus is only available on MRs. In case of Epics, updateStatus is null which is causing unnecessary error alert while closing or reopening any Epic. Root cause to why it started failing now is not yet found.

This MR adds an optional chaining to badgeState.updateStatus call in notes/components/comment_form.vue to the error.

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

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screen Recording 2024-05-15 at 4.23.40 PM.mov Screen Recording 2024-05-15 at 4.24.04 PM.mov

How to set up and validate locally

Prerequisites:

  1. The namespace must have GitLab Ultimate plan.

Steps to verify:

  1. Login with any user
  2. Go to any Group > Epics
  3. Select any epic or create one
  4. Try to close the Epic from the comment form in the bottom of the page.
  5. Verify there is no alert
Edited by Rajan Mistry

Merge request reports