Skip to content

Commit ecb352d

Browse files
authored
fix(tracker): do not show done or canceled issues as overdue (#11098)
The tracker due date presenter and editor decided whether to suppress the overdue warning only from value.$lookup.status. Most places that render them (issue edit control panel, Gantt quick info, Kanban cards, list views without a status lookup) pass the plain issue, so the status category was unknown and done/canceled issues with a past due date were still shown as overdue. Resolve the status from the shared status store by value.status and fall back to the lookup, the same way task's DueDateEditor and the lead/recruit Kanban cards already do. Fixes #8906 Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com> Co-authored-by: Michael Uray <michaeluray@users.noreply.github.com>
1 parent e8f5efe commit ecb352d

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎plugins/tracker-resources/src/components/issues/DueDateEditor.svelte‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
import task from '@hcengineering/task'
1919
import { Issue } from '@hcengineering/tracker'
2020
import { DueDatePresenter } from '@hcengineering/ui'
21+
import { statusStore } from '@hcengineering/view-resources'
2122
2223
export let value: WithLookup<Issue>
2324
export let width: string | undefined = undefined
2425
export let editable: boolean = true
2526
2627
const client = getClient()
27-
$: shouldIgnoreOverdue =
28-
value.$lookup?.status?.category === task.statusCategory.Won ||
29-
value.$lookup?.status?.category === task.statusCategory.Lost
28+
$: status = $statusStore.byId.get(value.status) ?? value.$lookup?.status
29+
$: shouldIgnoreOverdue = status?.category === task.statusCategory.Won || status?.category === task.statusCategory.Lost
3030
3131
const handleDueDateChanged = async (newDueDate: number | undefined | null) => {
3232
if (newDueDate === undefined || value.dueDate === newDueDate) {

‎plugins/tracker-resources/src/components/issues/DueDatePresenter.svelte‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import task from '@hcengineering/task'
1919
import { Issue } from '@hcengineering/tracker'
2020
import { ButtonKind, ButtonSize, DueDatePresenter } from '@hcengineering/ui'
21+
import { statusStore } from '@hcengineering/view-resources'
2122
2223
export let value: WithLookup<Issue>
2324
export let kind: ButtonKind = 'link'
@@ -42,9 +43,8 @@
4243
4344
$: shouldRenderPresenter = dueDateMs != null
4445
45-
$: ignoreOverDue =
46-
value.$lookup?.status?.category === task.statusCategory.Won ||
47-
value.$lookup?.status?.category === task.statusCategory.Lost
46+
$: status = $statusStore.byId.get(value.status) ?? value.$lookup?.status
47+
$: ignoreOverDue = status?.category === task.statusCategory.Won || status?.category === task.statusCategory.Lost
4848
</script>
4949

5050
<DueDatePresenter

0 commit comments

Comments
 (0)