Commit ea837aa9 authored by Jan Provaznik's avatar Jan Provaznik

Use epic iid attribute when updating epic in UI

iid attribute is expected when updating an epic in graphql API. So
we should pass iid instead of id.
parent 116c133e
......@@ -129,7 +129,7 @@ export const requestEpicDateSaveFailure = ({ commit }, data) => {
};
export const saveDate = ({ state, dispatch }, { dateType, dateTypeIsFixed, newDate }) => {
const updateEpicInput = {
iid: `${state.epicId}`,
iid: `${state.epicIid}`,
groupPath: state.groupPath,
[dateType === dateTypes.start ? 'startDateIsFixed' : 'dueDateIsFixed']: dateTypeIsFixed,
};
......@@ -188,7 +188,7 @@ export const toggleEpicSubscription = ({ state, dispatch }) => {
mutation: epicSetSubscription,
variables: {
epicSetSubscriptionInput: {
iid: `${state.epicId}`,
iid: `${state.epicIid}`,
groupPath: state.groupPath,
subscribedState: !state.subscribed,
},
......
......@@ -61,6 +61,7 @@ class EpicPresenter < Gitlab::View::Presenter::Delegated
def base_attributes(author_icon)
{
epic_id: epic.id,
epic_iid: epic.iid,
created: epic.created_at,
author: epic_author(author_icon),
ancestors: epic_ancestors(epic.ancestors.inc_group),
......
......@@ -11,6 +11,9 @@
"epic_id": {
"type": "integer"
},
"epic_iid": {
"type": "integer"
},
"created": {
"type": "string"
},
......
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