UBER-81: Fix move project (#3182)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2023-05-16 00:16:41 +07:00
committed by GitHub
parent ceec07d528
commit 3d4e19270b
17 changed files with 580 additions and 78 deletions
+2 -12
View File
@@ -257,7 +257,6 @@ async function doIssueUpdate (
{ limit: 1 }
)
const updatedComponent = newParent !== undefined ? newParent.component : null
const updatedParents =
newParent !== undefined ? [{ parentId: newParent._id, parentTitle: newParent.title }, ...newParent.parents] : []
@@ -268,13 +267,12 @@ async function doIssueUpdate (
? {}
: { parents: [...issue.parents].slice(0, parentInfoIndex + 1).concat(updatedParents) }
return { ...parentsUpdate, component: updatedComponent }
return { ...parentsUpdate }
}
res.push(
control.txFactory.createTxUpdateDoc(updateTx.objectClass, updateTx.objectSpace, updateTx.objectId, {
parents: updatedParents,
component: updatedComponent
parents: updatedParents
}),
...(await updateSubIssues(updateTx, control, update))
)
@@ -284,14 +282,6 @@ async function doIssueUpdate (
updateIssueParentEstimations(issue, res, control, issue.parents, updatedParents)
}
if (Object.prototype.hasOwnProperty.call(updateTx.operations, 'component')) {
res.push(
...(await updateSubIssues(updateTx, control, {
component: updateTx.operations.component
}))
)
}
if (
Object.prototype.hasOwnProperty.call(updateTx.operations, 'estimation') ||
Object.prototype.hasOwnProperty.call(updateTx.operations, 'reportedTime')