QFix: Few check from sentry and disable due date test (#5050)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2024-03-25 11:59:44 +07:00 committed by GitHub
parent 3bbb8915ec
commit 32d7c3bdae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 13 additions and 7 deletions

View File

@ -43,7 +43,7 @@
$: itemLabel = (key.attr.type as Collection<AttachedDoc>).itemLabel $: itemLabel = (key.attr.type as Collection<AttachedDoc>).itemLabel
$: translate(itemLabel ?? key.attr.label, {}, $themeStore.language).then((v) => { $: void translate(itemLabel ?? key.attr.label, {}, $themeStore.language).then((v) => {
keyLabel = v keyLabel = v
}) })
@ -63,8 +63,14 @@
() => {}, () => {},
(result) => { (result) => {
if (result !== undefined) { if (result !== undefined) {
if (result.action === 'add') addRef(result.tag) if (result.action === 'add') {
else if (result.action === 'remove') removeTag(items.filter((it) => it.tag === result.tag._id)[0]._id) void addRef(result.tag)
} else if (result.action === 'remove') {
const filtered = items.filter((it) => it.tag === result.tag._id)
if (filtered.length > 0) {
void removeTag(filtered[0]._id)
}
}
} }
} }
) )

View File

@ -324,8 +324,8 @@ export async function issueStatusSort (
if (viewletDescriptorId === tracker.viewlet.Kanban) { if (viewletDescriptorId === tracker.viewlet.Kanban) {
value.sort((a, b) => { value.sort((a, b) => {
const aVal = statuses.get(a) as IssueStatus const aVal = statuses.get(a)
const bVal = statuses.get(b) as IssueStatus const bVal = statuses.get(b)
const res = const res =
listIssueKanbanStatusOrder.indexOf(aVal?.category as Ref<StatusCategory>) - listIssueKanbanStatusOrder.indexOf(aVal?.category as Ref<StatusCategory>) -
listIssueKanbanStatusOrder.indexOf(bVal?.category as Ref<StatusCategory>) listIssueKanbanStatusOrder.indexOf(bVal?.category as Ref<StatusCategory>)
@ -335,7 +335,7 @@ export async function issueStatusSort (
const bIndex = getStatusIndex(type, taskTypes, b) const bIndex = getStatusIndex(type, taskTypes, b)
return aIndex - bIndex return aIndex - bIndex
} else { } else {
return aVal.name.localeCompare(bVal.name) return (aVal?.name ?? '').localeCompare(bVal?.name ?? '')
} }
} }
return res return res

View File

@ -429,7 +429,7 @@ test.describe('Tracker filters tests', () => {
}) })
}) })
test('Due date filter', async ({ page }) => { test.skip('Due date filter', async ({ page }) => {
const dueDateOverdueIssue: NewIssue = { const dueDateOverdueIssue: NewIssue = {
title: `Issue for the Due date yesterday filter-${generateId()}`, title: `Issue for the Due date yesterday filter-${generateId()}`,
description: 'Issue for the Due date yesterday filter', description: 'Issue for the Due date yesterday filter',