Commit 685598cf authored by Martin Wortschack's avatar Martin Wortschack

Merge branch '32557-fix-error-adding-already-linked-issue' into 'master'

Fix error when linking already linked issue to epic

See merge request gitlab-org/gitlab!21213
parents 919a92f2 20bcc1ea
---
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
dispatch('setItemInputValue', '');
dispatch('toggleAddItemForm', { toggleState: false });
};
export const receiveAddItemFailure = ({ commit }, { itemAddFailureType }) => {
export const receiveAddItemFailure = ({ commit }, { itemAddFailureType } = {}) => {
commit(types.RECEIVE_ADD_ITEM_FAILURE, { itemAddFailureType });
};
export const addItem = ({ state, dispatch, getters }) => {
......
......@@ -930,6 +930,22 @@ describe('RelatedItemTree', () => {
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', () => {
......
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