Compare commits

..

77 Commits

Author SHA1 Message Date
6fea5640e8
chore(deps): go mod tidy
Some checks failed
continuous-integration/drone/pr Build is failing
2024-03-09 19:07:54 +01:00
b874b02412
feat(filters): highlight label colors in filter 2024-03-09 19:07:32 +01:00
084a62e835
fix(filters): layout problems with assignee user avatar 2024-03-09 19:07:31 +01:00
f3e2b1b89b
fix(filters): remove footer when editing a saved filter 2024-03-09 19:07:31 +01:00
4e26fa0b85
fix(filters): correctly use filter in saved filter 2024-03-09 19:07:31 +01:00
32e1a2018a
chore: generate swagger docs 2024-03-09 19:07:31 +01:00
05d3bb4fb6
fix(filters): swagger docs for kanban buckets 2024-03-09 19:07:31 +01:00
38985a8318
fix(filters): pass correct filter query to kanban and gantt loading 2024-03-09 19:07:31 +01:00
d0b762d761
docs(filter): add filter query explanation 2024-03-09 19:07:31 +01:00
e0a7f46e5d
feat(filter): fall back to simple search when filter query does not contain any filter inputs 2024-03-09 19:07:31 +01:00
be253333c2
fix(filter): don't transform anything when input is empty 2024-03-09 19:07:31 +01:00
533e778b93
fix(filter): bubble filter query changes up on blur only 2024-03-09 19:07:31 +01:00
1d2f3ca546
feat(filter): resolve label and project ids back to titles when loading a filter 2024-03-09 19:07:31 +01:00
55b806d311
feat(filter): resolve labels and projects to ids before filtering 2024-03-09 19:07:30 +01:00
0c947790e8
feat(filter): add button to show filter results 2024-03-09 19:07:30 +01:00
b35eb4adbf
fix(filter): correctly pass down options 2024-03-09 19:07:30 +01:00
a22652b737
feat(filter): remove now unused code 2024-03-09 19:07:30 +01:00
4dcd3abe9e
feat(filter): emit filter query 2024-03-09 19:07:30 +01:00
5a13c2b423
fix(filter): add role=search to filter card 2024-03-09 19:07:30 +01:00
9eac746984
feat(filter): autocomplete for projects 2024-03-09 19:07:30 +01:00
b1d9dc6fc3
feat(filter): autocomplete for assignees 2024-03-09 19:07:30 +01:00
8fa2f6686a
feat(filter): add actual label search when autocompleting 2024-03-09 19:07:30 +01:00
9ade917ac4
feat(filter): make the autocomplete look pretty 2024-03-09 19:07:30 +01:00
7fc1f27ef5
feat(filter): add autocompletion poc for labels 2024-03-09 19:07:30 +01:00
356399f853
chore: format 2024-03-09 19:07:29 +01:00
9ed93b181d
fix(filters): make sure spaces before and after are not removed 2024-03-09 19:07:29 +01:00
981f2d0e70
fix(filters): color 2024-03-09 19:07:29 +01:00
2990c01d0a
fix(filters): make the button look less like a button to avoid spacing problems 2024-03-09 19:07:29 +01:00
2daecbc2bc
feat(filters): add basic autocomplete component 2024-03-09 19:07:29 +01:00
35487093c6
chore: update lockfile 2024-03-09 19:07:26 +01:00
571bcf8996
feat(filters): show user name and avatar for assignee filters 2024-03-09 19:06:52 +01:00
388a3a68ba
fix(filters): date filter value not populated 2024-03-09 19:06:52 +01:00
992d108bfa
feat(filters): add date values 2024-03-09 19:06:52 +01:00
c22daab28c
feat(filters): make date values in filter query editable 2024-03-09 19:06:52 +01:00
3bd639a110
chore(filters): copy datepicker 2024-03-09 19:06:52 +01:00
0d12d72b73
chore(filters): add histoire story file 2024-03-09 19:06:52 +01:00
1827102a0a
feat(filters): parse date properties to enable datepicker button 2024-03-09 19:06:52 +01:00
4586e525ce
fix(filters): use readable colors for dark and light mode 2024-03-09 19:06:52 +01:00
c162a5a457
feat(filter): add auto resize for filter query input 2024-03-09 19:06:52 +01:00
b978d344ca
feat(filter): add basic highlighting filter query component 2024-03-09 19:06:51 +01:00
28fa2c517a
feat(filters): make new filter syntax work with Typesense 2024-03-09 19:06:48 +01:00
bc6d812eb0
fix(filters): lint 2024-03-09 19:06:35 +01:00
87c027aafd
chore(filters): cleanup old variables 2024-03-09 19:06:35 +01:00
65e1357705
fix(tests): make filter tests work again 2024-03-09 19:06:35 +01:00
eebfee73d3
fix(filter): correctly filter for buckets 2024-03-09 19:06:35 +01:00
ef1cc9720c
feat(filter): add in keyword 2024-03-09 19:06:35 +01:00
c6b682507a
feat(filter): add better error message when passing an invalid filter expression 2024-03-09 19:06:35 +01:00
9d3fb6f81d
chore(filter): cleanup 2024-03-09 19:06:35 +01:00
3ea81db836
feat(filter): migrate existing saved filters 2024-03-09 19:06:35 +01:00
76ed2cff5f
feat(filter): nesting 2024-03-09 19:06:35 +01:00
e43349618b
feat(filter): more tests 2024-03-09 19:06:35 +01:00
9624cc9e97
fix(filter): translate all tests 2024-03-09 19:06:35 +01:00
764bc15d49
fix(filter): allow filtering for "project" 2024-03-09 19:06:34 +01:00
3fc4aaa2a1
fix(filter): allow filtering on "in" condition 2024-03-09 19:06:34 +01:00
9f73e2c5f9
fix(filter): don't crash on empty filter 2024-03-09 19:06:34 +01:00
c1e137d8ee
fix(filter): make sure single filter condition works 2024-03-09 19:06:34 +01:00
de320aac72
feat(filters): basic text filter works now 2024-03-09 19:06:34 +01:00
307ffe11c4
feat(filters): very basic filter parsing 2024-03-09 19:06:31 +01:00
86983f50d4 fix(migration): Trello checklists (#2140)
All checks were successful
continuous-integration/drone/push Build is passing
Trello checklists are now properly converted to html checklists and put into the description.

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: #2140
Reviewed-by: konrad <k@knt.li>
Co-authored-by: Christoph Ritzer <chris@cloumail.at>
Co-committed-by: Christoph Ritzer <chris@cloumail.at>
2024-03-09 09:01:02 +00:00
e65c3ffe6b
fix(migration): convert trello card descriptions from markdown to html
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-09 09:31:57 +01:00
9ad7bc5932 fix(deps): update module github.com/go-sql-driver/mysql to v1.8.0
Some checks failed
continuous-integration/drone/push Build is failing
2024-03-09 08:24:14 +00:00
2101f37aa2
fix(ci): exclude tasks from cron runs
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-09 09:10:49 +01:00
e8d77e61e4 chore(deps): update dependency @vue/eslint-config-typescript to v13
Some checks failed
continuous-integration/drone/push Build is failing
2024-03-09 08:00:20 +00:00
7e69c7cbe0 chore(deps): update dev-dependencies
Some checks failed
continuous-integration/drone/push Build is failing
2024-03-09 07:59:59 +00:00
Frederick [Bot]
f6204c307e chore(i18n): update translations via Crowdin
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-09 00:06:36 +00:00
28d72d4d47
feat(i18n): add pt-br as selectable language in the frontend
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-08 20:06:48 +01:00
2c5f8126c5 fix(deps): update module github.com/golang-jwt/jwt/v5 to v5.2.1
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-08 13:38:47 +00:00
9aea5830f3 fix(deps): update sentry-javascript monorepo to v7.106.0
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is passing
2024-03-08 12:07:55 +00:00
14452428a2
chore(deps): update github.com/go-jose/go-jose to 3.0.3
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-08 09:59:55 +01:00
b5682ecc18 chore(deps): update dependency electron to v29.1.1
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-08 07:59:34 +00:00
0bec7ee1ab fix(deps): update dependency @intlify/unplugin-vue-i18n to v3.0.1
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is failing
2024-03-08 02:07:52 +00:00
d1a3eb9701 fix(deps): update dependency @intlify/unplugin-vue-i18n to v3
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-03-07 12:06:52 +00:00
cba09c8eb1 chore(deps): update dev-dependencies
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-03-07 07:06:40 +00:00
dc291a51f5
fix(migration): do not expire trello token
All checks were successful
continuous-integration/drone/push Build is passing
2024-03-06 15:13:54 +01:00
e5e66d73f5 chore(deps): update dev-dependencies
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is passing
2024-03-06 00:06:22 +00:00
d69fc28125 fix(openid): OIDC teams should not have admins (#2161)
All checks were successful
continuous-integration/drone/push Build is passing
This PR fixes an issue discussed in #2152. Before this PR, the user who triggered team creation automatically got the admin flag set for this group, which makes perfect sense for the normal UI workflow. OIDC managed teams cannot be edited in Vikunja, and they're created automatically by the first user logging in having this team assigned. This PR therefore makes sure that OIDC managed team members do not receive the admin flag.

Co-authored-by: Daniel Herrmann <daniel.herrmann1@gmail.com>
Reviewed-on: #2161
Reviewed-by: konrad <k@knt.li>
Co-authored-by: waza-ari <daniel.herrmann@makerspace-darmstadt.de>
Co-committed-by: waza-ari <daniel.herrmann@makerspace-darmstadt.de>
2024-03-05 22:08:39 +00:00
4793282baf fix(deps): update src.techknowlogick.com/xgo digest to 770b8ea
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2024-03-05 19:06:41 +00:00
15 changed files with 1047 additions and 2186 deletions

View File

@ -3,6 +3,11 @@ kind: pipeline
type: docker
name: build-and-test
trigger:
event:
exclude:
- cron
workspace:
base: /go
path: src/code.vikunja.io/api
@ -528,6 +533,9 @@ trigger:
ref:
- refs/heads/main
- "refs/tags/**"
event:
exclude:
- cron
steps:
# Needed to get the versions right as they depend on tags
@ -808,6 +816,9 @@ trigger:
ref:
- refs/heads/main
- "refs/tags/**"
event:
exclude:
- cron
steps:
- name: fetch-tags
@ -1145,6 +1156,9 @@ trigger:
ref:
- refs/heads/main
- "refs/tags/**"
event:
exclude:
- cron
steps:
- name: fetch-tags
@ -1360,6 +1374,9 @@ trigger:
ref:
- refs/heads/main
- "refs/tags/**"
event:
exclude:
- cron
depends_on:
- build-and-test
@ -1384,6 +1401,6 @@ steps:
- failure
---
kind: signature
hmac: 008b86263a8d03806da907c128a837a380901f1a2190a658c22d4e06cadc1b64
hmac: a569410ea13ad83c15c7606ed44b17b6bac0eb66d668344dfbf008c9448b4af5
...

View File

@ -51,7 +51,7 @@
}
},
"devDependencies": {
"electron": "29.1.0",
"electron": "29.1.1",
"electron-builder": "24.13.3"
},
"dependencies": {

View File

@ -769,10 +769,10 @@ electron-publish@24.13.1:
lazy-val "^1.0.5"
mime "^2.5.2"
electron@29.1.0:
version "29.1.0"
resolved "https://registry.yarnpkg.com/electron/-/electron-29.1.0.tgz#37f0e4915226db3c87bc54b187795272bf61fc39"
integrity sha512-giJVIm0sWVp+8V1GXrKqKTb+h7no0P3ooYqEd34AD9wMJzGnAeL+usj+R0155/0pdvvP1mgydnA7lcaFA2M9lw==
electron@29.1.1:
version "29.1.1"
resolved "https://registry.yarnpkg.com/electron/-/electron-29.1.1.tgz#e9cb11311324e4b43a3e73667cd2b65a30e8fa34"
integrity sha512-cXN15NgCi7MkzGo5/23ZQbii+0UfhmUiDjACunmzcUofYCjF42XhFbL7JZnwgI0qtBCCeJU8qZNZt9lU91gUFw==
dependencies:
"@electron/get" "^2.0.0"
"@types/node" "^20.9.0"

View File

@ -56,10 +56,10 @@
"@fortawesome/vue-fontawesome": "3.0.6",
"@github/hotkey": "3.1.0",
"@infectoone/vue-ganttastic": "2.2.0",
"@intlify/unplugin-vue-i18n": "2.0.0",
"@intlify/unplugin-vue-i18n": "3.0.1",
"@kyvg/vue3-notification": "3.2.0",
"@sentry/tracing": "7.105.0",
"@sentry/vue": "7.105.0",
"@sentry/tracing": "7.106.0",
"@sentry/vue": "7.106.0",
"@tiptap/core": "2.2.4",
"@tiptap/extension-blockquote": "2.2.4",
"@tiptap/extension-bold": "2.2.4",
@ -141,44 +141,44 @@
"@types/is-touch-device": "1.0.2",
"@types/lodash.debounce": "4.0.9",
"@types/marked": "5.0.2",
"@types/node": "20.11.24",
"@types/node": "20.11.25",
"@types/postcss-preset-env": "7.7.0",
"@types/sortablejs": "1.15.8",
"@typescript-eslint/eslint-plugin": "7.1.1",
"@typescript-eslint/parser": "7.1.1",
"@vitejs/plugin-legacy": "5.3.1",
"@vitejs/plugin-legacy": "5.3.2",
"@vitejs/plugin-vue": "5.0.4",
"@vue/eslint-config-typescript": "12.0.0",
"@vue/eslint-config-typescript": "13.0.0",
"@vue/test-utils": "2.4.4",
"@vue/tsconfig": "0.5.1",
"autoprefixer": "10.4.18",
"browserslist": "4.23.0",
"caniuse-lite": "1.0.30001593",
"caniuse-lite": "1.0.30001596",
"css-has-pseudo": "6.0.2",
"csstype": "3.1.3",
"cypress": "13.6.6",
"esbuild": "0.20.1",
"eslint": "8.57.0",
"eslint-plugin-vue": "9.22.0",
"happy-dom": "13.6.2",
"happy-dom": "13.7.0",
"histoire": "0.17.9",
"postcss": "8.4.35",
"postcss-easing-gradients": "3.0.1",
"postcss-easings": "4.0.0",
"postcss-focus-within": "8.0.1",
"postcss-preset-env": "9.4.0",
"rollup": "4.12.0",
"postcss-preset-env": "9.5.0",
"rollup": "4.12.1",
"rollup-plugin-visualizer": "5.12.0",
"sass": "1.71.1",
"start-server-and-test": "2.0.3",
"typescript": "5.3.3",
"typescript": "5.4.2",
"vite": "5.1.5",
"vite-plugin-inject-preload": "1.3.3",
"vite-plugin-pwa": "0.19.2",
"vite-plugin-sentry": "1.4.0",
"vite-svg-loader": "5.1.0",
"vitest": "1.3.1",
"vue-tsc": "2.0.4",
"vue-tsc": "2.0.6",
"wait-on": "7.2.0",
"workbox-cli": "7.0.0"
},

File diff suppressed because it is too large Load Diff

View File

@ -21,6 +21,7 @@ export const SUPPORTED_LOCALES = {
'hu-HU': 'Magyar',
'ar-SA': 'اَلْعَرَبِيَّةُ',
'sl-SI': 'Slovenščina',
'pt-BR': 'Português Brasileiro',
// IMPORTANT: Also add new languages to useDayjsLanguageSync
} as const

File diff suppressed because it is too large Load Diff

View File

@ -57,7 +57,11 @@
"logout": "Logga ut",
"emailInvalid": "Vänligen ange en giltig e-postadress.",
"usernameRequired": "Vänligen ange ett användarnamn.",
"usernameMustNotContainSpace": "The username must not contain spaces.",
"usernameMustNotLookLikeUrl": "The username must not look like a URL.",
"passwordRequired": "Vänligen ange ett lösenord.",
"passwordNotMin": "Password must have at least 8 characters.",
"passwordNotMax": "Password must have at most 250 characters.",
"showPassword": "Show the password",
"hidePassword": "Hide the password",
"noAccountYet": "Har du inget konto än?",
@ -708,7 +712,8 @@
"repeat": "Upprepa",
"startDate": "Startdatum",
"title": "Titel",
"updated": "Updated"
"updated": "Updated",
"doneAt": "Done At"
},
"subscription": {
"subscribedTaskThroughParentProject": "You can't unsubscribe here because you are subscribed to this task through its project.",
@ -969,7 +974,9 @@
"setBackground": "Set background",
"share": "Dela",
"newProject": "Nytt projekt",
"createProject": "Skapa projekt"
"createProject": "Skapa projekt",
"cantArchiveIsDefault": "",
"cantDeleteIsDefault": ""
},
"apiConfig": {
"url": "Vikunja URL",
@ -1089,8 +1096,7 @@
},
"about": {
"title": "Om",
"frontendVersion": "Frontend Version: {version}",
"apiVersion": "API Version: {version}"
"version": ""
},
"time": {
"units": {

View File

@ -1,7 +1,7 @@
import {computed, ref, watch} from 'vue'
import type dayjs from 'dayjs'
import {i18n, type SupportedLocale, type ISOLanguage} from '@/i18n'
import {i18n, type ISOLanguage, type SupportedLocale} from '@/i18n'
export const DAYJS_LOCALE_MAPPING = {
'de-de': 'de',
@ -22,6 +22,7 @@ export const DAYJS_LOCALE_MAPPING = {
'hu-HU': 'hu',
'ar-SA': 'ar-sa',
'sl-SI': 'sl',
'pt-BR': 'pt',
} as Record<SupportedLocale, ISOLanguage>
export const DAYJS_LANGUAGE_IMPORTS = {
@ -43,6 +44,7 @@ export const DAYJS_LANGUAGE_IMPORTS = {
'hu-hu': () => import('dayjs/locale/hu'),
'ar-sa': () => import('dayjs/locale/ar-sa'),
'sl-si': () => import('dayjs/locale/sl'),
'pt-br': () => import('dayjs/locale/pt-br'),
} as Record<SupportedLocale, () => Promise<ILocale>>
export function useDayjsLanguageSync(dayjsGlobal: typeof dayjs) {

9
go.mod
View File

@ -33,10 +33,10 @@ require (
github.com/gabriel-vasile/mimetype v1.4.3
github.com/ganigeorgiev/fexpr v0.4.0
github.com/getsentry/sentry-go v0.27.0
github.com/go-sql-driver/mysql v1.7.1
github.com/go-sql-driver/mysql v1.8.0
github.com/go-testfixtures/testfixtures/v3 v3.10.0
github.com/gocarina/gocsv v0.0.0-20231116093920-b87c2d0e983a
github.com/golang-jwt/jwt/v5 v5.2.0
github.com/golang-jwt/jwt/v5 v5.2.1
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
github.com/google/uuid v1.6.0
github.com/hashicorp/go-version v1.6.0
@ -77,13 +77,14 @@ require (
gopkg.in/d4l3k/messagediff.v1 v1.2.1
gopkg.in/yaml.v3 v3.0.1
mvdan.cc/xurls/v2 v2.5.0
src.techknowlogick.com/xgo v1.7.1-0.20240206231429-45b9ea635e03
src.techknowlogick.com/xgo v1.7.1-0.20240305180710-770b8eae9cec
src.techknowlogick.com/xormigrate v1.7.1
xorm.io/builder v0.3.13
xorm.io/xorm v1.3.8
)
require (
filippo.io/edwards25519 v1.1.0 // indirect
github.com/ClickHouse/ch-go v0.58.2 // indirect
github.com/ClickHouse/clickhouse-go/v2 v2.18.0 // indirect
github.com/KyleBanks/depth v1.2.1 // indirect
@ -107,7 +108,7 @@ require (
github.com/go-chi/chi/v5 v5.0.10 // indirect
github.com/go-faster/city v1.0.1 // indirect
github.com/go-faster/errors v0.6.1 // indirect
github.com/go-jose/go-jose/v3 v3.0.1 // indirect
github.com/go-jose/go-jose/v3 v3.0.3 // indirect
github.com/go-openapi/jsonpointer v0.20.1 // indirect
github.com/go-openapi/jsonreference v0.20.3 // indirect
github.com/go-openapi/spec v0.20.4 // indirect

30
go.sum
View File

@ -2,6 +2,8 @@ code.vikunja.io/web v0.0.0-20210706160506-d85def955bd3 h1:MXl7Ff9a/ndTpuEmQKIGhq
code.vikunja.io/web v0.0.0-20210706160506-d85def955bd3/go.mod h1:OgFO06HN1KpA4S7Dw/QAIeygiUPSeGJJn1ykz/sjZdU=
dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk=
dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a h1:lSA0F4e9A2NcQSqGqTOXqu2aRi/XEQxDCBwM8yJtE6s=
gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a/go.mod h1:EXuID2Zs0pAQhH8yz+DNjUbjppKQzKFAn28TMYPB6IU=
gitee.com/travelliu/dm v1.8.11192/go.mod h1:DHTzyhCrM843x9VdKVbZ+GKXGRbKM2sJ4LxihRxShkE=
@ -123,8 +125,8 @@ github.com/go-faster/city v1.0.1 h1:4WAxSZ3V2Ws4QRDrscLEDcibJY8uf41H6AhXDrNDcGw=
github.com/go-faster/city v1.0.1/go.mod h1:jKcUJId49qdW3L1qKHH/3wPeUstCVpVSXTM6vO3VcTw=
github.com/go-faster/errors v0.6.1 h1:nNIPOBkprlKzkThvS/0YaX8Zs9KewLCOSFQS5BU06FI=
github.com/go-faster/errors v0.6.1/go.mod h1:5MGV2/2T9yvlrbhe9pD9LO5Z/2zCSq2T8j+Jpi2LAyY=
github.com/go-jose/go-jose/v3 v3.0.1 h1:pWmKFVtt+Jl0vBZTIpz/eAKwsm6LkIxDVVbFHKkchhA=
github.com/go-jose/go-jose/v3 v3.0.1/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxFMht0mSX+u8=
github.com/go-jose/go-jose/v3 v3.0.3 h1:fFKWeig/irsp7XD2zBxvnmA/XaRWp5V3CBsZXJF7G7k=
github.com/go-jose/go-jose/v3 v3.0.3/go.mod h1:5b+7YgP7ZICgJDBdfjZaIt+H/9L9T/YQrVfLAMboGkQ=
github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
@ -150,8 +152,8 @@ github.com/go-playground/validator/v10 v10.15.1 h1:BSe8uhN+xQ4r5guV/ywQI4gO59C2r
github.com/go-playground/validator/v10 v10.15.1/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU=
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI=
github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
github.com/go-sql-driver/mysql v1.8.0 h1:UtktXaU2Nb64z/pLiGIxY4431SJ4/dR5cjMmlVHgnT4=
github.com/go-sql-driver/mysql v1.8.0/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
github.com/go-testfixtures/testfixtures/v3 v3.10.0 h1:BrBwN7AuC+74g5qtk9D59TLGOaEa8Bw1WmIsf+SyzWc=
@ -165,8 +167,8 @@ github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRx
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY=
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
github.com/golang-jwt/jwt/v5 v5.2.0 h1:d/ix8ftRUorsN+5eMIlF4T6J8CAt9rch3My2winC1Jw=
github.com/golang-jwt/jwt/v5 v5.2.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk=
github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 h1:au07oEsX2xN0ktxqI+Sida1w446QrXBRJ0nee3SNZlA=
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
@ -194,7 +196,6 @@ github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
@ -554,7 +555,6 @@ golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACk
golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200221231518-2aa609cf4a9d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
@ -566,6 +566,7 @@ golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5y
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g=
@ -579,6 +580,7 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=
golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@ -600,6 +602,7 @@ golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qx
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc=
golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI=
@ -610,6 +613,7 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@ -640,12 +644,16 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8=
golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@ -656,6 +664,7 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@ -676,6 +685,7 @@ golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78/go.mod h1:emZCQorbCU4vsT4f
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ=
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@ -770,8 +780,8 @@ nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYm
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
src.techknowlogick.com/xgo v1.7.1-0.20240206231429-45b9ea635e03 h1:GMq57lSFGhXrFuOJ/HuSf67Y/SfzWxlJRZus262YxXw=
src.techknowlogick.com/xgo v1.7.1-0.20240206231429-45b9ea635e03/go.mod h1:31CE1YKtDOrKTk9PSnjTpe6YbO6W/0LTYZ1VskL09oU=
src.techknowlogick.com/xgo v1.7.1-0.20240305180710-770b8eae9cec h1:ICDp83UjJvLcOFWHAxr7vmziKIHJkE4jsIF1mbT9Bwk=
src.techknowlogick.com/xgo v1.7.1-0.20240305180710-770b8eae9cec/go.mod h1:31CE1YKtDOrKTk9PSnjTpe6YbO6W/0LTYZ1VskL09oU=
src.techknowlogick.com/xormigrate v1.7.1 h1:RKGLLUAqJ+zO8iZ7eOc7oLH7f0cs2gfXSZSvBRBHnlY=
src.techknowlogick.com/xormigrate v1.7.1/go.mod h1:YGNBdj8prENlySwIKmfoEXp7ILGjAltyKFXD0qLgD7U=
xorm.io/builder v0.3.7/go.mod h1:aUW0S9eb9VCaPohFCH3j7czOx1PMW3i1HrSzbLYGBSE=

View File

@ -211,6 +211,42 @@ func addMoreInfoToTeams(s *xorm.Session, teams []*Team) (err error) {
return
}
// CreateNewTeam creates a new team and assignes the user that has caused creation
// as the first member of the team
// If firstUserShouldBeAdmin is true, the user will be an admin of the team
// Note: this function has been extracted from the Create method to allow
// an additional parameter to control whether the user should become admin of the team
func (t *Team) CreateNewTeam(s *xorm.Session, a web.Auth, firstUserShouldBeAdmin bool) (err error) {
doer, err := user.GetFromAuth(a)
if err != nil {
return err
}
// Check if we have a name
if t.Name == "" {
return ErrTeamNameCannotBeEmpty{}
}
t.CreatedByID = doer.ID
t.CreatedBy = doer
_, err = s.Insert(t)
if err != nil {
return
}
tm := TeamMember{TeamID: t.ID, Username: doer.Username, Admin: firstUserShouldBeAdmin}
if err = tm.Create(s, doer); err != nil {
return err
}
return events.Dispatch(&TeamCreatedEvent{
Team: t,
Doer: a,
})
}
// ReadOne implements the CRUD method to get one team
// @Summary Gets one team
// @Description Returns a team by its ID.
@ -291,33 +327,13 @@ func (t *Team) ReadAll(s *xorm.Session, a web.Auth, search string, page int, per
// @Failure 500 {object} models.Message "Internal error"
// @Router /teams [put]
func (t *Team) Create(s *xorm.Session, a web.Auth) (err error) {
doer, err := user.GetFromAuth(a)
err = t.CreateNewTeam(s, a, true)
if err != nil {
return err
}
// Check if we have a name
if t.Name == "" {
return ErrTeamNameCannotBeEmpty{}
}
t.CreatedByID = doer.ID
t.CreatedBy = doer
_, err = s.Insert(t)
if err != nil {
return
}
tm := TeamMember{TeamID: t.ID, Username: doer.Username, Admin: true}
if err = tm.Create(s, doer); err != nil {
return err
}
return events.Dispatch(&TeamCreatedEvent{
Team: t,
Doer: a,
})
}
// Delete deletes a team

View File

@ -340,7 +340,7 @@ func CreateOIDCTeam(s *xorm.Session, teamData *models.OIDCTeam, u *user.User, is
OidcID: teamData.OidcID,
Issuer: issuer,
}
err = team.Create(s, u)
err = team.CreateNewTeam(s, u, false)
return team, err
}

View File

@ -17,6 +17,8 @@
package trello
import (
"bytes"
"code.vikunja.io/api/pkg/config"
"code.vikunja.io/api/pkg/files"
"code.vikunja.io/api/pkg/log"
@ -24,6 +26,7 @@ import (
"code.vikunja.io/api/pkg/modules/migration"
"code.vikunja.io/api/pkg/user"
"github.com/adlio/trello"
"github.com/yuin/goldmark"
)
// Migration represents the trello migration struct
@ -74,7 +77,7 @@ func (m *Migration) Name() string {
// @Router /migration/trello/auth [get]
func (m *Migration) AuthURL() string {
return "https://trello.com/1/authorize" +
"?expiration=1hour" +
"?expiration=never" +
"&scope=read" +
"&callback_method=fragment" +
"&response_type=token" +
@ -160,6 +163,16 @@ func getTrelloData(token string) (trelloData []*trello.Board, err error) {
return
}
func convertMarkdownToHTML(input string) (output string, err error) {
var buf bytes.Buffer
err = goldmark.Convert([]byte(input), &buf)
if err != nil {
return
}
//#nosec - we are not responsible to escape this as we don't know the context where it is used
return buf.String(), nil
}
// Converts all previously obtained data from trello into the vikunja format.
// `trelloData` should contain all boards with their projects and cards respectively.
func convertTrelloDataToVikunja(trelloData []*trello.Board, token string) (fullVikunjaHierachie []*models.ProjectWithTasksAndBuckets, err error) {
@ -220,28 +233,32 @@ func convertTrelloDataToVikunja(trelloData []*trello.Board, token string) (fullV
// The usual stuff: Title, description, position, bucket id
task := &models.Task{
Title: card.Name,
Description: card.Desc,
KanbanPosition: card.Pos,
BucketID: bucketID,
}
task.Description, err = convertMarkdownToHTML(card.Desc)
if err != nil {
return nil, err
}
if card.Due != nil {
task.DueDate = *card.Due
}
// Checklists (as markdown in description)
for _, checklist := range card.Checklists {
task.Description += "\n\n## " + checklist.Name + "\n"
task.Description += "\n\n<h2> " + checklist.Name + "</h2>\n\n" + `<ul data-type="taskList">`
for _, item := range checklist.CheckItems {
task.Description += "\n* "
task.Description += "\n"
if item.State == "complete" {
task.Description += "[x]"
task.Description += `<li data-checked="true" data-type="taskItem"><label><input type="checkbox" checked="checked"><span></span></label><div><p>` + item.Name + `</p></div></li>`
} else {
task.Description += "[ ]"
task.Description += `<li data-checked="false" data-type="taskItem"><label><input type="checkbox"><span></span></label><div><p>` + item.Name + `</p></div></li>`
}
task.Description += " " + item.Name
}
task.Description += "</ul>"
}
if len(card.Checklists) > 0 {
log.Debugf("[Trello Migration] Converted %d checklists from card %s", len(card.Checklists), card.ID)

View File

@ -52,7 +52,7 @@ func TestConvertTrelloToVikunja(t *testing.T) {
Cards: []*trello.Card{
{
Name: "Test Card 1",
Desc: "Card Description",
Desc: "Card Description **bold**",
Pos: 123,
Due: &time1,
Labels: []*trello.Label{
@ -218,7 +218,7 @@ func TestConvertTrelloToVikunja(t *testing.T) {
{
Task: models.Task{
Title: "Test Card 1",
Description: "Card Description",
Description: "<p>Card Description <strong>bold</strong></p>\n",
BucketID: 1,
KanbanPosition: 123,
DueDate: time1,
@ -249,15 +249,17 @@ func TestConvertTrelloToVikunja(t *testing.T) {
Title: "Test Card 2",
Description: `
## Checkproject 1
<h2> Checkproject 1</h2>
* [ ] Pending Task
* [x] Completed Task
<ul data-type="taskList">
<li data-checked="false" data-type="taskItem"><label><input type="checkbox"><span></span></label><div><p>Pending Task</p></div></li>
<li data-checked="true" data-type="taskItem"><label><input type="checkbox" checked="checked"><span></span></label><div><p>Completed Task</p></div></li></ul>
## Checkproject 2
<h2> Checkproject 2</h2>
* [ ] Pending Task
* [ ] Another Pending Task`,
<ul data-type="taskList">
<li data-checked="false" data-type="taskItem"><label><input type="checkbox"><span></span></label><div><p>Pending Task</p></div></li>
<li data-checked="false" data-type="taskItem"><label><input type="checkbox"><span></span></label><div><p>Another Pending Task</p></div></li></ul>`,
BucketID: 1,
KanbanPosition: 124,
},