mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-26 11:34:58 +02:00
Assign project when assigning sprint (#2612)
Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
@@ -336,6 +336,24 @@ async function doIssueUpdate (
|
||||
}))
|
||||
)
|
||||
}
|
||||
|
||||
if (Object.prototype.hasOwnProperty.call(updateTx.operations, 'sprint')) {
|
||||
if (updateTx.operations.sprint != null) {
|
||||
const [sprint] = await control.findAll(tracker.class.Sprint, { _id: updateTx.operations.sprint }, { limit: 1 })
|
||||
res.push(
|
||||
control.txFactory.createTxUpdateDoc(updateTx.objectClass, updateTx.objectSpace, updateTx.objectId, {
|
||||
project: sprint.project
|
||||
})
|
||||
)
|
||||
} else {
|
||||
res.push(
|
||||
control.txFactory.createTxUpdateDoc(updateTx.objectClass, updateTx.objectSpace, updateTx.objectId, {
|
||||
project: null
|
||||
})
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
Object.prototype.hasOwnProperty.call(updateTx.operations, 'estimation') ||
|
||||
Object.prototype.hasOwnProperty.call(updateTx.operations, 'reportedTime')
|
||||
|
||||
Reference in New Issue
Block a user