[UBER-82] Update components (#3227)

Signed-off-by: Ruslan Bayandinov <wazsone@ya.ru>
This commit is contained in:
Ruslan Bayandinov
2023-05-22 18:03:22 +07:00
committed by GitHub
parent fb5c4b1f41
commit 2f4cb2c2a7
25 changed files with 72 additions and 1216 deletions
@@ -52,11 +52,10 @@
if (issue.component) {
const component = await client.findOne(tracker.class.Component, { _id: issue.component })
projectLead = component?.lead || undefined
projectMembers = component?.members || []
} else {
projectLead = undefined
projectMembers = []
}
projectMembers = []
if (hasSpace(issue)) {
const project = await client.findOne(tracker.class.Project, { _id: issue.space })
if (project !== undefined) {
@@ -13,8 +13,6 @@
// limitations under the License.
-->
<script lang="ts">
import { EmployeeAccount } from '@hcengineering/contact'
import { getCurrentAccount } from '@hcengineering/core'
import { getClient } from '@hcengineering/presentation'
import { Component, Issue, Project } from '@hcengineering/tracker'
import { Button, Label } from '@hcengineering/ui'
@@ -41,12 +39,8 @@
async function createMissingComponent (cur: Component): Promise<void> {
await client.createDoc(cur._class, targetProject._id, {
label: cur.label,
members: [(getCurrentAccount() as EmployeeAccount).employee],
status: cur.status,
startDate: cur.startDate,
attachments: 0,
description: cur.description,
targetDate: cur.targetDate,
comments: 0,
lead: cur.lead
})