Commit c00ea95b authored by Kushal Pandya's avatar Kushal Pandya

Merge branch...

Merge branch '356634-creating-an-issue-in-a-board-with-a-weight-in-scope-does-not-add-weight' into 'master'

Fix create issue in board with weight

See merge request gitlab-org/gitlab!83487
parents 86e3a049 479487ca
......@@ -111,7 +111,7 @@ export function fullLabelId(label) {
export function formatIssueInput(issueInput, boardConfig) {
const { labelIds = [], assigneeIds = [] } = issueInput;
const { labels, assigneeId, milestoneId } = boardConfig;
const { labels, assigneeId, milestoneId, weight } = boardConfig;
return {
...issueInput,
......@@ -121,6 +121,7 @@ export function formatIssueInput(issueInput, boardConfig) {
: issueInput?.milestoneId,
labelIds: [...labelIds, ...(labels?.map((l) => fullLabelId(l)) || [])],
assigneeIds: [...assigneeIds, ...(assigneeId ? [fullUserId(assigneeId)] : [])],
weight,
};
}
......
......@@ -63,7 +63,7 @@ export default {
} else if (weight === NO_WEIGHT) {
return -2;
}
return -1;
return null;
},
toggleEdit() {
if (this.dropdownHidden) {
......
......@@ -27,6 +27,7 @@ describe('formatIssueInput', () => {
labelIds: ['gid://gitlab/GroupLabel/5', 'gid://gitlab/GroupLabel/44'],
assigneeIds: ['gid://gitlab/User/55'],
milestoneId: 'gid://gitlab/Milestone/66',
weight: 1,
});
});
});
......
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