Skip to content

Fix issue "blocked by" modal

Coung Ngo requested to merge cngo-fix-issue-blocked-modal into master

What does this MR do?

This MR fixes a bug with the "blocked by" modal in issues.

Background

The "blocked by" modal is triggered when the user clicks Close issue on an issue that is marked as blocked by another issue.

Currently, two "blocked by" modals/alerts are used: the top Close issue button in the issue header uses a new modal, and the bottom Close issue button below the comment textarea uses an old alert. When the issue header was migrated to Vue recently, it didn't update the bottom "blocked by" modal which now doesn't work as expected.

Changes within this MR

The bottom Close issue button (in comment_form.vue) "blocked by" modal was removed and updated to use the same one as the top Close issue button (in header_actions.vue). This is done by sending an event via an event hub from comment_form.vue to header_actions.vue.

Both comment_form.vue and header_actions.vue share the same Vuex store so some changes were made to use shared state for consistency.

Screenshots (strongly suggested)

Screen_Recording_2020-11-23_at_11.46.51_am

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Coung Ngo

Merge request reports