Commit aa73c226 authored by Natalia Tepluhina's avatar Natalia Tepluhina Committed by David O'Regan

Resolve "User "cannot merge" an issue 🤔"

parent 26d31ce4
...@@ -45,6 +45,7 @@ export const checkPageAndAction = (page, action) => { ...@@ -45,6 +45,7 @@ export const checkPageAndAction = (page, action) => {
export const isInIncidentPage = () => checkPageAndAction('incidents', 'show'); export const isInIncidentPage = () => checkPageAndAction('incidents', 'show');
export const isInIssuePage = () => checkPageAndAction('issues', 'show'); export const isInIssuePage = () => checkPageAndAction('issues', 'show');
export const isInDesignPage = () => checkPageAndAction('issues', 'designs');
export const isInMRPage = () => checkPageAndAction('merge_requests', 'show'); export const isInMRPage = () => checkPageAndAction('merge_requests', 'show');
export const isInEpicPage = () => checkPageAndAction('epics', 'show'); export const isInEpicPage = () => checkPageAndAction('epics', 'show');
......
...@@ -14,7 +14,12 @@ import SidebarSeverity from './components/severity/sidebar_severity.vue'; ...@@ -14,7 +14,12 @@ import SidebarSeverity from './components/severity/sidebar_severity.vue';
import Translate from '../vue_shared/translate'; import Translate from '../vue_shared/translate';
import CopyEmailToClipboard from './components/copy_email_to_clipboard.vue'; import CopyEmailToClipboard from './components/copy_email_to_clipboard.vue';
import createDefaultClient from '~/lib/graphql'; 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 createFlash from '~/flash';
import { __ } from '~/locale'; import { __ } from '~/locale';
...@@ -49,7 +54,8 @@ function mountAssigneesComponent(mediator) { ...@@ -49,7 +54,8 @@ function mountAssigneesComponent(mediator) {
projectPath: fullPath, projectPath: fullPath,
field: el.dataset.field, field: el.dataset.field,
signedIn: el.hasAttribute('data-signed-in'), 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) { ...@@ -78,7 +84,7 @@ function mountReviewersComponent(mediator) {
issuableIid: String(iid), issuableIid: String(iid),
projectPath: fullPath, projectPath: fullPath,
field: el.dataset.field, field: el.dataset.field,
issuableType: isInIssuePage() ? 'issue' : 'merge_request', issuableType: isInIssuePage() || isInDesignPage() ? 'issue' : 'merge_request',
}, },
}), }),
}); });
......
---
title: 'Resolve User cannot merge an issue'
merge_request: 52311
author:
type: fixed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment