Fix error on Epic close and reopen action
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:
- The namespace must have GitLab Ultimate plan.
Steps to verify:
- Login with any user
- Go to any Group > Epics
- Select any epic or create one
- Try to close the Epic from the comment form in the bottom of the page.
- Verify there is no alert