mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-22 17:45:02 +02:00
Fix create draft issue duplicate id (#2935)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
@@ -100,6 +100,7 @@
|
||||
if (!canSave) {
|
||||
return
|
||||
}
|
||||
const _id: Ref<Issue> = generateId()
|
||||
loading = true
|
||||
try {
|
||||
const space = currentProject._id
|
||||
@@ -135,13 +136,13 @@
|
||||
parentIssue._class,
|
||||
'subIssues',
|
||||
value,
|
||||
object._id
|
||||
_id
|
||||
)
|
||||
|
||||
await descriptionBox.createAttachments()
|
||||
await descriptionBox.createAttachments(_id)
|
||||
|
||||
for (const label of object.labels) {
|
||||
await client.addCollection(label._class, label.space, object._id, tracker.class.Issue, 'labels', {
|
||||
await client.addCollection(label._class, label.space, _id, tracker.class.Issue, 'labels', {
|
||||
title: label.title,
|
||||
color: label.color,
|
||||
tag: label.tag
|
||||
@@ -149,7 +150,7 @@
|
||||
}
|
||||
|
||||
addNotification(await translate(tracker.string.IssueCreated, {}), getTitle(object.title), IssueNotification, {
|
||||
issueId: object._id,
|
||||
issueId: _id,
|
||||
subTitlePostfix: (await translate(tracker.string.Created, { value: 1 })).toLowerCase()
|
||||
})
|
||||
draftController.remove()
|
||||
|
||||
@@ -177,23 +177,25 @@
|
||||
{/if}
|
||||
<EditBox bind:value={title} placeholder={tracker.string.IssueTitlePlaceholder} kind="large-style" on:blur={save} />
|
||||
<div class="w-full mt-6">
|
||||
<AttachmentStyledBox
|
||||
bind:this={descriptionBox}
|
||||
useAttachmentPreview={true}
|
||||
objectId={_id}
|
||||
_class={tracker.class.Issue}
|
||||
space={issue.space}
|
||||
alwaysEdit
|
||||
on:attached={save}
|
||||
on:detached={save}
|
||||
showButtons
|
||||
on:blur={save}
|
||||
on:changeContent={triggerSave}
|
||||
maxHeight={'card'}
|
||||
focusable
|
||||
bind:content={description}
|
||||
placeholder={tracker.string.IssueDescriptionPlaceholder}
|
||||
/>
|
||||
{#key _id}
|
||||
<AttachmentStyledBox
|
||||
bind:this={descriptionBox}
|
||||
useAttachmentPreview={true}
|
||||
objectId={_id}
|
||||
_class={tracker.class.Issue}
|
||||
space={issue.space}
|
||||
alwaysEdit
|
||||
on:attached={save}
|
||||
on:detached={save}
|
||||
showButtons
|
||||
on:blur={save}
|
||||
on:changeContent={triggerSave}
|
||||
maxHeight={'card'}
|
||||
focusable
|
||||
bind:content={description}
|
||||
placeholder={tracker.string.IssueDescriptionPlaceholder}
|
||||
/>
|
||||
{/key}
|
||||
</div>
|
||||
|
||||
<div class="mt-6">
|
||||
|
||||
Reference in New Issue
Block a user