Fix due date (#3042)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov
2023-04-21 18:55:29 +07:00
committed by GitHub
parent 134a4fe10c
commit 5ef4205a97
3 changed files with 3 additions and 2 deletions
@@ -92,7 +92,7 @@
</div>
<DueDatePresenter
value={object.dueDate}
shouldRender={object.dueDate !== null}
shouldRender={object.dueDate !== null && object.dueDate !== undefined}
onChange={async (e) => {
await client.update(object, { dueDate: e })
}}
@@ -41,6 +41,7 @@
$: shouldRenderPresenter =
dueDateMs !== null &&
dueDateMs !== undefined &&
value.$lookup?.status?.category !== tracker.issueStatusCategory.Completed &&
value.$lookup?.status?.category !== tracker.issueStatusCategory.Canceled
</script>
+1 -1
View File
@@ -1063,7 +1063,7 @@ function fillDateSort (key: string, pipeline: any[], sort: any, options: FindOpt
}
pipeline.push({
$addFields: {
[`sort_isNull_${key}`]: { $eq: [`$${key}`, null] }
[`sort_isNull_${key}`]: { [key]: null }
}
})
sort[`sort_isNull_${key}`] = options.sort[_key] === SortingOrder.Ascending ? 1 : -1