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