Commit 20bcc1ea authored by Florie Guibert's avatar Florie Guibert

Fix error when linking already linked issue to epic

parent dad6c5ea
---
title: Fix error when linking already linked issue to epic
merge_request: 21213
author:
type: fixed
...@@ -308,7 +308,7 @@ export const receiveAddItemSuccess = ({ dispatch, commit, getters }, { rawItems ...@@ -308,7 +308,7 @@ export const receiveAddItemSuccess = ({ dispatch, commit, getters }, { rawItems
dispatch('setItemInputValue', ''); dispatch('setItemInputValue', '');
dispatch('toggleAddItemForm', { toggleState: false }); dispatch('toggleAddItemForm', { toggleState: false });
}; };
export const receiveAddItemFailure = ({ commit }, { itemAddFailureType }) => { export const receiveAddItemFailure = ({ commit }, { itemAddFailureType } = {}) => {
commit(types.RECEIVE_ADD_ITEM_FAILURE, { itemAddFailureType }); commit(types.RECEIVE_ADD_ITEM_FAILURE, { itemAddFailureType });
}; };
export const addItem = ({ state, dispatch, getters }) => { export const addItem = ({ state, dispatch, getters }) => {
......
...@@ -930,6 +930,22 @@ describe('RelatedItemTree', () => { ...@@ -930,6 +930,22 @@ describe('RelatedItemTree', () => {
done, done,
); );
}); });
it('should set `state.itemAddInProgress` to false, no payload', done => {
testAction(
actions.receiveAddItemFailure,
undefined,
{},
[
{
type: types.RECEIVE_ADD_ITEM_FAILURE,
payload: { itemAddFailureType: undefined },
},
],
[],
done,
);
});
}); });
describe('addItem', () => { describe('addItem', () => {
......
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