mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-22 21:50:34 +03:00
UBERF-4799: Fix migration tasktype doubling (#4289)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
d6291c7d70
commit
b782769647
@ -640,6 +640,10 @@ export async function fixTaskTypes (
|
||||
const resultProjects: Project[] = []
|
||||
|
||||
for (const t of projectTypes) {
|
||||
if (t.tasks?.length > 0) {
|
||||
// Already migrated.
|
||||
continue
|
||||
}
|
||||
t.tasks = [...(t.tasks ?? [])]
|
||||
if (t.targetClass === undefined) {
|
||||
const targetProjectClassId: Ref<Class<Doc>> = generateId()
|
||||
|
@ -55,7 +55,11 @@ async function reorderStates (_client: MigrationUpgradeClient): Promise<void> {
|
||||
const bIndex = order.indexOf(states.get(b)?.category ?? task.statusCategory.UnStarted)
|
||||
return aIndex - bIndex
|
||||
})
|
||||
await client.diffUpdate(taskType, { statuses })
|
||||
try {
|
||||
await client.diffUpdate(taskType, { statuses })
|
||||
} catch (err: any) {
|
||||
console.error(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -173,13 +173,18 @@ export function mouseAttractor (op: () => void, diff = 2): (evt: MouseEvent) =>
|
||||
* @returns {string} string with replaced URLs
|
||||
*/
|
||||
export function replaceURLs (text: string): string {
|
||||
return autolinker.link(text, {
|
||||
urls: true,
|
||||
phone: false,
|
||||
email: false,
|
||||
sanitizeHtml: true,
|
||||
stripPrefix: false
|
||||
})
|
||||
try {
|
||||
return autolinker.link(text, {
|
||||
urls: true,
|
||||
phone: false,
|
||||
email: false,
|
||||
sanitizeHtml: true,
|
||||
stripPrefix: false
|
||||
})
|
||||
} catch (err: any) {
|
||||
console.error(err)
|
||||
return text
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -31,6 +31,7 @@ export { default as Reactions } from './components/reactions/Reactions.svelte'
|
||||
export { default as ActivityMessageTemplate } from './components/activity-message/ActivityMessageTemplate.svelte'
|
||||
export { default as ActivityMessagePresenter } from './components/activity-message/ActivityMessagePresenter.svelte'
|
||||
export { default as ActivityExtension } from './components/ActivityExtension.svelte'
|
||||
export { default as ActivityMessageHeader } from './components/activity-message/ActivityMessageHeader.svelte'
|
||||
|
||||
export default async (): Promise<Resources> => ({
|
||||
component: {
|
||||
|
Loading…
Reference in New Issue
Block a user