mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-22 21:50:34 +03:00
Fix bad estimation migration (#3808)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
ca0dd235b6
commit
96b0cae268
@ -144,7 +144,7 @@ async function fixEstimation (client: MigrationClient): Promise<void> {
|
||||
for (const child of childInfo ?? []) {
|
||||
child.estimation = child.estimation * 8
|
||||
}
|
||||
await client.update(DOMAIN_TASK, { _id: issue._id }, { reportedTime: issue.estimation * 8, childInfo })
|
||||
await client.update(DOMAIN_TASK, { _id: issue._id }, { estimation: issue.estimation * 8, childInfo })
|
||||
}
|
||||
const createTxes = await client.find<TxCollectionCUD<Issue, Issue>>(DOMAIN_TX, {
|
||||
'tx.objectClass': tracker.class.Issue,
|
||||
@ -166,7 +166,7 @@ async function fixEstimation (client: MigrationClient): Promise<void> {
|
||||
for (const tx of updateTxes) {
|
||||
const val = (tx.tx as TxUpdateDoc<Issue>).operations.estimation
|
||||
if (val !== undefined) {
|
||||
await client.update(DOMAIN_TX, { _id: tx._id }, { 'tx.operations.value': val * 8 })
|
||||
await client.update(DOMAIN_TX, { _id: tx._id }, { 'tx.operations.estimation': val * 8 })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user