Fix due date (#3042)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2023-04-21 17:55:29 +06:00 committed by GitHub
parent 134a4fe10c
commit 5ef4205a97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View File

@ -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 })
}}

View File

@ -41,6 +41,7 @@
$: shouldRenderPresenter =
dueDateMs !== null &&
dueDateMs !== undefined &&
value.$lookup?.status?.category !== tracker.issueStatusCategory.Completed &&
value.$lookup?.status?.category !== tracker.issueStatusCategory.Canceled
</script>

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