mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 19:44:59 +03:00
Fix board status order (#2042)
Signed-off-by: Dvinyanin Alexandr <dvinyanin.alexandr@gmail.com>
This commit is contained in:
parent
1b3840537a
commit
b5105383d2
@ -291,7 +291,7 @@ export function createModel (builder: Builder): void {
|
|||||||
icon: tracker.icon.CategoryBacklog,
|
icon: tracker.icon.CategoryBacklog,
|
||||||
color: 0,
|
color: 0,
|
||||||
defaultStatusName: 'Backlog',
|
defaultStatusName: 'Backlog',
|
||||||
order: 2
|
order: 0
|
||||||
},
|
},
|
||||||
tracker.issueStatusCategory.Backlog
|
tracker.issueStatusCategory.Backlog
|
||||||
)
|
)
|
||||||
@ -317,7 +317,7 @@ export function createModel (builder: Builder): void {
|
|||||||
icon: tracker.icon.CategoryStarted,
|
icon: tracker.icon.CategoryStarted,
|
||||||
color: 2,
|
color: 2,
|
||||||
defaultStatusName: 'In Progress',
|
defaultStatusName: 'In Progress',
|
||||||
order: 0
|
order: 2
|
||||||
},
|
},
|
||||||
tracker.issueStatusCategory.Started
|
tracker.issueStatusCategory.Started
|
||||||
)
|
)
|
||||||
|
@ -297,6 +297,14 @@ export const projectsTitleMap: Record<ProjectsViewMode, IntlString> = Object.fre
|
|||||||
closed: tracker.string.ClosedProjects
|
closed: tracker.string.ClosedProjects
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const listIssueStatusOrder = [
|
||||||
|
tracker.issueStatusCategory.Started,
|
||||||
|
tracker.issueStatusCategory.Unstarted,
|
||||||
|
tracker.issueStatusCategory.Backlog,
|
||||||
|
tracker.issueStatusCategory.Completed,
|
||||||
|
tracker.issueStatusCategory.Canceled
|
||||||
|
] as const
|
||||||
|
|
||||||
export function getCategories (
|
export function getCategories (
|
||||||
key: IssuesGroupByKeys | undefined,
|
key: IssuesGroupByKeys | undefined,
|
||||||
elements: Issue[],
|
elements: Issue[],
|
||||||
@ -308,7 +316,9 @@ export function getCategories (
|
|||||||
return [undefined] // No grouping
|
return [undefined] // No grouping
|
||||||
}
|
}
|
||||||
|
|
||||||
const defaultStatuses = Object.values(statuses).map((x) => x._id)
|
const defaultStatuses = listIssueStatusOrder.map(
|
||||||
|
(category) => statuses.find((status) => status.category === category)?._id
|
||||||
|
)
|
||||||
|
|
||||||
const existingCategories = Array.from(
|
const existingCategories = Array.from(
|
||||||
new Set(
|
new Set(
|
||||||
|
Loading…
Reference in New Issue
Block a user