Commit 2f2b42ef authored by Florie Guibert's avatar Florie Guibert

Fix create epic in tree after selecting Add issue

parent cdf6a458
import Vue from 'vue'; import Vue from 'vue';
import * as types from './mutation_types'; import * as types from './mutation_types';
import { issuableTypesMap } from 'ee/related_issues/constants';
export default { export default {
[types.SET_INITIAL_CONFIG]( [types.SET_INITIAL_CONFIG](
...@@ -142,6 +143,7 @@ export default { ...@@ -142,6 +143,7 @@ export default {
[types.TOGGLE_CREATE_EPIC_FORM](state, { toggleState }) { [types.TOGGLE_CREATE_EPIC_FORM](state, { toggleState }) {
state.showCreateEpicForm = toggleState; state.showCreateEpicForm = toggleState;
state.showAddItemForm = false; state.showAddItemForm = false;
state.issuableType = issuableTypesMap.EPIC;
}, },
[types.TOGGLE_CREATE_ISSUE_FORM](state, { toggleState }) { [types.TOGGLE_CREATE_ISSUE_FORM](state, { toggleState }) {
......
---
title: Fix create epic in tree after selecting Add issue
merge_request: 28300
author:
type: fixed
...@@ -389,6 +389,7 @@ describe('RelatedItemsTree', () => { ...@@ -389,6 +389,7 @@ describe('RelatedItemsTree', () => {
expect(state.showCreateEpicForm).toBe(data.toggleState); expect(state.showCreateEpicForm).toBe(data.toggleState);
expect(state.showAddItemForm).toBe(false); expect(state.showAddItemForm).toBe(false);
expect(state.issuableType).toEqual('epic');
}); });
}); });
......
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