Commit e9fec32f authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'ph/323688/fixToggleWipWidgetState' into 'master'

Fixed toggling draft state showing wrong state

See merge request gitlab-org/gitlab!56001
parents 071bf64a 68629297
...@@ -70,7 +70,7 @@ export default { ...@@ -70,7 +70,7 @@ export default {
data: { data: {
mergeRequestSetWip: { mergeRequestSetWip: {
errors, errors,
mergeRequest: { workInProgress, title }, mergeRequest: { mergeableDiscussionsState, workInProgress, title },
}, },
}, },
}, },
...@@ -87,6 +87,8 @@ export default { ...@@ -87,6 +87,8 @@ export default {
}); });
const data = produce(sourceData, (draftState) => { const data = produce(sourceData, (draftState) => {
// eslint-disable-next-line no-param-reassign
draftState.project.mergeRequest.mergeableDiscussionsState = mergeableDiscussionsState;
// eslint-disable-next-line no-param-reassign // eslint-disable-next-line no-param-reassign
draftState.project.mergeRequest.workInProgress = workInProgress; draftState.project.mergeRequest.workInProgress = workInProgress;
// eslint-disable-next-line no-param-reassign // eslint-disable-next-line no-param-reassign
...@@ -107,6 +109,7 @@ export default { ...@@ -107,6 +109,7 @@ export default {
errors: [], errors: [],
mergeRequest: { mergeRequest: {
__typename: 'MergeRequest', __typename: 'MergeRequest',
mergeableDiscussionsState: true,
title: this.mr.title, title: this.mr.title,
workInProgress: false, workInProgress: false,
}, },
......
mutation toggleWIPStatus($projectPath: ID!, $iid: String!, $wip: Boolean!) { mutation toggleWIPStatus($projectPath: ID!, $iid: String!, $wip: Boolean!) {
mergeRequestSetWip(input: { projectPath: $projectPath, iid: $iid, wip: $wip }) { mergeRequestSetWip(input: { projectPath: $projectPath, iid: $iid, wip: $wip }) {
mergeRequest { mergeRequest {
mergeableDiscussionsState
title title
workInProgress workInProgress
} }
......
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