mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-13 05:07:43 +02:00
UBERF-4248: Task type (#4042)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
@@ -37,7 +37,8 @@ const object: AttachedData<Issue> = {
|
||||
remainingTime: 0,
|
||||
estimation: 0,
|
||||
reports: 0,
|
||||
childInfo: []
|
||||
childInfo: [],
|
||||
kind: tracker.taskTypes.Issue
|
||||
}
|
||||
|
||||
export interface IssueOptions {
|
||||
@@ -100,7 +101,8 @@ async function genIssue (client: TxOperations, statuses: Ref<IssueStatus>[]): Pr
|
||||
estimation: object.estimation,
|
||||
reports: 0,
|
||||
relations: [],
|
||||
childInfo: []
|
||||
childInfo: [],
|
||||
kind: tracker.taskTypes.Issue
|
||||
}
|
||||
await client.addCollection(
|
||||
tracker.class.Issue,
|
||||
|
||||
@@ -15,7 +15,7 @@ import core, {
|
||||
import { MinioService } from '@hcengineering/minio'
|
||||
import recruit from '@hcengineering/model-recruit'
|
||||
import { Applicant, Candidate, Vacancy } from '@hcengineering/recruit'
|
||||
import task, { ProjectType, genRanks } from '@hcengineering/task'
|
||||
import task, { ProjectType, TaskType, genRanks } from '@hcengineering/task'
|
||||
import faker from 'faker'
|
||||
import jpeg, { BufferRet } from 'jpeg-js'
|
||||
import { AttachmentOptions, addAttachments } from './attachments'
|
||||
@@ -97,13 +97,16 @@ async function genVacansyApplicants (
|
||||
name: faker.name.title(),
|
||||
description: faker.lorem.sentences(2),
|
||||
shortDescription: faker.lorem.sentences(1),
|
||||
category: recruit.category.VacancyTypeCategories,
|
||||
descriptor: recruit.descriptors.VacancyType,
|
||||
private: false,
|
||||
members: [],
|
||||
archived: false,
|
||||
tasks: [],
|
||||
// TODO: Fix me.
|
||||
statuses: states.map((s) => {
|
||||
return { _id: s }
|
||||
})
|
||||
return { _id: s, taskType: '' as Ref<TaskType> }
|
||||
}),
|
||||
targetClass: recruit.class.Vacancy
|
||||
}
|
||||
|
||||
await ctx.with('update', {}, (ctx) =>
|
||||
@@ -180,7 +183,8 @@ async function genApplicant (
|
||||
status: faker.random.arrayElement(states),
|
||||
rank,
|
||||
startDate: null,
|
||||
dueDate: null
|
||||
dueDate: null,
|
||||
kind: recruit.taskTypes.Applicant
|
||||
}
|
||||
|
||||
// Update or create candidate
|
||||
|
||||
Reference in New Issue
Block a user