mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-23 18:15:03 +02:00
Assign project when assigning sprint (#2612)
Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
@@ -593,12 +593,17 @@
|
||||
object = { ...object, project: projectId }
|
||||
}
|
||||
|
||||
const handleSprintIdChanged = (sprintId: Ref<Sprint> | null | undefined) => {
|
||||
const handleSprintIdChanged = async (sprintId: Ref<Sprint> | null | undefined) => {
|
||||
if (sprintId === undefined) {
|
||||
return
|
||||
}
|
||||
let projectSprintId: Ref<Project> | null
|
||||
if (sprintId != null) {
|
||||
const sprint = await client.findOne(tracker.class.Sprint, { _id: sprintId })
|
||||
projectSprintId = sprint && sprint.project ? sprint.project : null
|
||||
} else projectSprintId = null
|
||||
|
||||
object = { ...object, sprint: sprintId }
|
||||
object = { ...object, sprint: sprintId, project: projectSprintId }
|
||||
}
|
||||
|
||||
function addTagRef (tag: TagElement): void {
|
||||
|
||||
Reference in New Issue
Block a user