diff options
Diffstat (limited to 'app/assets/javascripts/boards')
-rw-r--r-- | app/assets/javascripts/boards/boards_util.js | 7 | ||||
-rw-r--r-- | app/assets/javascripts/boards/constants.js | 5 |
2 files changed, 10 insertions, 2 deletions
diff --git a/app/assets/javascripts/boards/boards_util.js b/app/assets/javascripts/boards/boards_util.js index 3219d74f85f..cdf25b2d428 100644 --- a/app/assets/javascripts/boards/boards_util.js +++ b/app/assets/javascripts/boards/boards_util.js @@ -1,6 +1,6 @@ import { sortBy, cloneDeep } from 'lodash'; import { getIdFromGraphQLId } from '~/graphql_shared/utils'; -import { ListType } from './constants'; +import { ListType, MilestoneIDs } from './constants'; export function getMilestone() { return null; @@ -108,7 +108,10 @@ export function formatIssueInput(issueInput, boardConfig) { return { ...issueInput, - milestoneId: milestoneId ? fullMilestoneId(milestoneId) : null, + milestoneId: + milestoneId && milestoneId !== MilestoneIDs.ANY + ? fullMilestoneId(milestoneId) + : issueInput?.milestoneId, labelIds: [...labelIds, ...(labels?.map((l) => fullLabelId(l)) || [])], assigneeIds: [...assigneeIds, ...(assigneeId ? [fullUserId(assigneeId)] : [])], }; diff --git a/app/assets/javascripts/boards/constants.js b/app/assets/javascripts/boards/constants.js index 16fb4596726..391e0d1fb0a 100644 --- a/app/assets/javascripts/boards/constants.js +++ b/app/assets/javascripts/boards/constants.js @@ -119,6 +119,11 @@ export const DraggableItemTypes = { list: 'list', }; +export const MilestoneIDs = { + NONE: 0, + ANY: -1, +}; + export default { BoardType, ListType, |