Commit 479487ca authored by Florie Guibert's avatar Florie Guibert

Fix create issue in board with weight

Changelog: fixed
EE: true
parent ab63d511
......@@ -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