diff --git a/app/assets/javascripts/lib/utils/common_utils.js b/app/assets/javascripts/lib/utils/common_utils.js index 128ef5b335e6fa3f11d4ce6855f236b8093ef646..a41e43780bc749ad1516f331b822a46dbb3be3f7 100644 --- a/app/assets/javascripts/lib/utils/common_utils.js +++ b/app/assets/javascripts/lib/utils/common_utils.js @@ -45,6 +45,7 @@ export const checkPageAndAction = (page, action) => { export const isInIncidentPage = () => checkPageAndAction('incidents', 'show'); export const isInIssuePage = () => checkPageAndAction('issues', 'show'); +export const isInDesignPage = () => checkPageAndAction('issues', 'designs'); export const isInMRPage = () => checkPageAndAction('merge_requests', 'show'); export const isInEpicPage = () => checkPageAndAction('epics', 'show'); diff --git a/app/assets/javascripts/sidebar/mount_sidebar.js b/app/assets/javascripts/sidebar/mount_sidebar.js index 2760bf431eaaac994d27b5a1ca91e932d0ae6d25..f2ba0085df6caf2d3273ca281270f43b1333e52a 100644 --- a/app/assets/javascripts/sidebar/mount_sidebar.js +++ b/app/assets/javascripts/sidebar/mount_sidebar.js @@ -14,7 +14,12 @@ import SidebarSeverity from './components/severity/sidebar_severity.vue'; import Translate from '../vue_shared/translate'; import CopyEmailToClipboard from './components/copy_email_to_clipboard.vue'; import createDefaultClient from '~/lib/graphql'; -import { isInIssuePage, isInIncidentPage, parseBoolean } from '~/lib/utils/common_utils'; +import { + isInIssuePage, + isInDesignPage, + isInIncidentPage, + parseBoolean, +} from '~/lib/utils/common_utils'; import createFlash from '~/flash'; import { __ } from '~/locale'; @@ -49,7 +54,8 @@ function mountAssigneesComponent(mediator) { projectPath: fullPath, field: el.dataset.field, signedIn: el.hasAttribute('data-signed-in'), - issuableType: isInIssuePage() || isInIncidentPage() ? 'issue' : 'merge_request', + issuableType: + isInIssuePage() || isInIncidentPage() || isInDesignPage() ? 'issue' : 'merge_request', }, }), }); @@ -78,7 +84,7 @@ function mountReviewersComponent(mediator) { issuableIid: String(iid), projectPath: fullPath, field: el.dataset.field, - issuableType: isInIssuePage() ? 'issue' : 'merge_request', + issuableType: isInIssuePage() || isInDesignPage() ? 'issue' : 'merge_request', }, }), }); diff --git a/changelogs/unreleased/299457-user-cannot-merge-an-issue.yml b/changelogs/unreleased/299457-user-cannot-merge-an-issue.yml new file mode 100644 index 0000000000000000000000000000000000000000..20ca2c6cc38aae03aea6c7fd5436380fe7c05a84 --- /dev/null +++ b/changelogs/unreleased/299457-user-cannot-merge-an-issue.yml @@ -0,0 +1,5 @@ +--- +title: 'Resolve User cannot merge an issue' +merge_request: 52311 +author: +type: fixed