Commit 3f9a4159 authored by Natalia Tepluhina's avatar Natalia Tepluhina Committed by Nicolò Maria Mezzopera

Fix setting assignees on boards when relative URL is enabled

parent d7281e68
import { IntrospectionFragmentMatcher } from 'apollo-cache-inmemory';
import Vue from 'vue'; import Vue from 'vue';
import VueApollo from 'vue-apollo'; import VueApollo from 'vue-apollo';
import { mapActions, mapGetters } from 'vuex'; import { mapActions, mapGetters } from 'vuex';
...@@ -35,13 +36,26 @@ import { ...@@ -35,13 +36,26 @@ import {
} from '~/lib/utils/common_utils'; } from '~/lib/utils/common_utils';
import { __ } from '~/locale'; import { __ } from '~/locale';
import sidebarEventHub from '~/sidebar/event_hub'; import sidebarEventHub from '~/sidebar/event_hub';
import introspectionQueryResultData from '~/sidebar/fragmentTypes.json';
import boardConfigToggle from './config_toggle'; import boardConfigToggle from './config_toggle';
import mountMultipleBoardsSwitcher from './mount_multiple_boards_switcher'; import mountMultipleBoardsSwitcher from './mount_multiple_boards_switcher';
Vue.use(VueApollo); Vue.use(VueApollo);
const fragmentMatcher = new IntrospectionFragmentMatcher({
introspectionQueryResultData,
});
const apolloProvider = new VueApollo({ const apolloProvider = new VueApollo({
defaultClient: createDefaultClient(), defaultClient: createDefaultClient(
{},
{
cacheConfig: {
fragmentMatcher,
},
assumeImmutableResults: true,
},
),
}); });
let issueBoardsApp; let issueBoardsApp;
......
...@@ -245,8 +245,8 @@ export default { ...@@ -245,8 +245,8 @@ export default {
@input="setDirtyState" @input="setDirtyState"
> >
<template #footer> <template #footer>
<gl-dropdown-item> <gl-dropdown-item v-if="directlyInviteMembers">
<sidebar-invite-members v-if="directlyInviteMembers" /> <sidebar-invite-members />
</gl-dropdown-item> </template </gl-dropdown-item> </template
></user-select> ></user-select>
</template> </template>
......
- dropdown_options = assignees_dropdown_options('issue') - dropdown_options = assignees_dropdown_options('issue')
- relative_url = Gitlab.config.gitlab.relative_url_root || '/'
.block.assignee{ ref: "assigneeBlock" } .block.assignee{ ref: "assigneeBlock" }
%template{ "v-if" => "issue.assignees" } %template{ "v-if" => "issue.assignees" }
%sidebar-assignees-widget{ ":iid" => "String(issue.iid)", %sidebar-assignees-widget{ ":iid" => "String(issue.iid)",
":full-path" => "issue.path.split('/-/')[0].substring(1)", ":full-path" => "issue.path.split('/-/')[0].substring(1).replace(`#{relative_url}`, '')",
":initial-assignees" => "issue.assignees", ":initial-assignees" => "issue.assignees",
":multiple-assignees" => "!Boolean(#{dropdown_options[:data][:"max-select"]})", ":multiple-assignees" => "!Boolean(#{dropdown_options[:data][:"max-select"]})",
"@assignees-updated" => "setAssignees" } "@assignees-updated" => "setAssignees" }
---
title: Resolve Cannot Set Assignee in Boards View for self-managed GitLab with Relative
URL
merge_request: 60711
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