Commit 59bea37b authored by James Lopez's avatar James Lopez

Merge branch 'jprovazn-expose-epic-iid' into 'master'

Use iid instead of id when updating epic attributes

See merge request gitlab-org/gitlab!23089
parents 8b4d0b76 ea837aa9
...@@ -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