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