Commit Graph
61 Commits
Author SHA1 Message Date
kolaente ba980b1b8e fix(migration): abort import on unexpected task creation error
Non-empty-title errors from task creation fell through silently and the
loop kept using a task with ID 0, attaching relations and labels to id
0. Return the error instead; empty titles keep being skipped.
2026-08-02 16:21:50 +02:00
kolaenteandkolaente 0101dc9386 fix(migration): seed task positions for exports without order information
Tasks imported without a position are inserted in front of the lowest one by
halving it. That reaches the minimum spacing every few dozen inserts, which
recalculates every position in the view and makes a large import O(n²) - a
10k task TickTick export with an empty Order column never finished.

Numbering the tasks up front skips the halving entirely and keeps the order
the export was written in.

Closes #3297
2026-07-26 01:13:08 +00:00
kolaente 781ffac198 fix(security): require Admin to detach a project from its parent (GHSA-44v6-7fxq-vgf4) 2026-07-19 18:59:34 +02:00
kolaente b31d606b88 fix(kanban): prevent cross-tenant bucket relocation via project_view_id mass-assignment (GHSA-569v-q83c-3j3g) 2026-07-19 18:59:34 +02:00
kolaenteandkolaente 9da51f5096 refactor(events): pass context to DispatchPending directly
Every DispatchPending caller either has the request context in scope or
is genuinely request-less, so passing it as a parameter replaces the
stored-context mechanism on the pending queue and satisfies
contextcheck. Also fixes lint findings in the audit package.
2026-06-12 08:56:08 +00:00
Tink botandkolaente fa6e1f8e49 fix(migration): reuse existing labels on re-import
Seed the dedup map at the start of insertFromStructure with the importing
user's existing labels, keyed by title + normalized hex color. Previously
the map was empty on each run, so importing the same CSV (or any other
migration format) twice would create a second copy of every label.

Scoped to the user's own labels so imports don't silently link to other
users' labels visible via shared projects.

Fixes #2742
2026-05-19 09:09:59 +00:00
kolaenteandkolaente db7f1445a8 fix(migration): compute attachment size from content during import
Import metadata is attacker-controlled and can forge a small size to
bypass the attachment size limit (GHSA-qh78-rvg3-cv54). Compute the
size from the decoded content instead of trusting a.File.Size.
2026-04-09 16:22:56 +00:00
kolaenteandkolaente e40877cca1 fix(migration): delete all default buckets when migration provides its own
Previously only the "To-Do" default bucket was deleted, leaving "Doing"
and "Done" as duplicates alongside migration-provided buckets. Now all
default-created buckets are removed when migration data already provides
bucket assignments for all tasks.
2026-04-07 12:05:47 +00:00
kolaente 6ed684d708 fix(events): dispatch pending events in migration and export handlers
Refs #2315
2026-03-03 12:46:34 +01:00
kolaente dbd74491c4 fix(files): update all callers to provide seekable readers for S3 uploads
Update all code paths that pass file content to the storage layer to
provide io.ReadSeeker instead of io.Reader:

- Avatar upload: use bytes.NewReader instead of bytes.Buffer
- Background upload handler: use bytes.NewReader instead of bytes.Buffer
- Unsplash background: buffer response body into bytes.NewReader
- Dump restore: buffer zip entry into bytes.NewReader
- Migration structure: pass bytes.NewReader directly instead of wrapping
  in io.NopCloser
- Task attachment: change NewAttachment parameter from io.ReadCloser to
  io.ReadSeeker
2026-02-08 15:31:25 +01:00
kolaenteandGitHub 17b8d20e7b fix(migration): reset buckets before creating related tasks so that they are actually created (#1015) 2025-06-25 14:03:44 +02:00
Dominik PschenitschniandGitHub 296577a875 fix: correct license header references (#882)
See originals:
- https://www.gnu.org/licenses/agpl-3.0.txt
- https://www.gnu.org/licenses/gpl-3.0.txt
2025-06-10 12:18:38 +02:00
kolaente 4d41a1bd9b feat(kanban): create To-Do, Doing, Done buckets when creating a new kanban view 2025-03-21 19:16:52 +01:00
kolaente d522d40773 fix(migration): do not fail when an attachment is too large
Resolves https://vikunja.sentry.io/issues/6389417364/events/d79bdea146b54a9dace8c81e3f787975/
2025-03-21 18:03:27 +01:00
kolaente 2ead48c1e9 fix(migration): do not crash when relating a task to itself
Resolves https://community.vikunja.io/t/vikunja-import-error-tried-to-relate-a-task-with-itself/1105
2025-03-02 13:24:55 +01:00
kolaente 0e37049343 fix(migration): add more debug logging 2025-01-20 12:08:10 +01:00
kolaente 28b4eaee31 fix(migration): make sure tasks are associated to the correct view and bucket for data imported from Vikunja dump
This change fixes a bug where imported projects would contain the default views additionally to the ones included in the export. This also caused the tasks to not show up in the views and buckets where they should show up, the newly imported ones.

Resolves https://community.vikunja.io/t/migration-from-vikunja-export-duplicated-boards-local-to-oidc/2690
2024-08-12 17:00:16 +02:00
kolaente ecdb03aca8 fix(migration): correctly set bucket for related tasks
When creating a related task during the import, migrating would fail because the migration would try to add the task to a bucket before the task was created. This fix changes the order in which that happens to prevent the error.
2024-07-17 10:05:59 +02:00
kolaente 359b07dabb fix(views): move bucket update to extra endpoint
BREAKING CHANGE: The bucket id of the task model is now only used internally and will not trigger a change in buckets when updating the task.

This resolves a problem where the task update routine needs to know the view context it is in. Because that's not really what it should be used for, the extra endpoint takes all required parameters and handles the complexity of actually updating the bucket.
This fixes a bug where it was impossible to move a task around between buckets of a saved filter view. In that case, the view of the bucket and the project the task was in would be different, hence the update failed.
2024-07-02 16:34:53 +02:00
kolaente ce1d7778c7 fix(export): make export work with project views and new task positions 2024-04-13 21:07:06 +02:00
kolaente 6e2b540394 fix(migration): import task comments with original timestamps
Partially resolves https://community.vikunja.io/t/trello-import-comments-and-assignments/2174/14
2024-04-13 14:44:55 +02:00
kolaente f3cdd7d15f fix(views): import 2024-03-19 00:47:51 +01:00
kolaente ca0de680ad fix(migration): import card covers when migrating from Trello 2024-03-10 16:30:06 +01:00
kolaente e40a0043d4 fix(migration): do not halt the whole migration when copying a background file failed 2024-02-19 19:21:06 +01:00
kolaente 3ff4d81618 fix(migration): ignore tasks with empty titles 2024-01-19 23:04:24 +01:00
kolaente d35c30dd0c fix(import): make sure importing works if parent / child projects are created in a different order
Resolves https://community.vikunja.io/t/migrating-from-self-hosted-instance/1805
2023-12-03 14:14:27 +01:00
kolaente 56625b0b90 fix: lint 2023-10-10 20:35:43 +02:00
kolaente c6bdb5752a fix(import): create related tasks without an id 2023-09-07 11:16:04 +02:00
kolaente b2f3a23cb3 fix(import): correctly set child project relations 2023-09-07 10:45:15 +02:00
kolaente 93795d2f29 fix(import): resolve task relations by old task ids 2023-09-07 10:24:15 +02:00
kolaente adf4b95ed3 fix(import): ignore duplicate project identifier 2023-09-07 10:12:15 +02:00
kolaente e518fb1191 chore: remove year from copyright headers
Resolves https://kolaente.dev/vikunja/api/pulls/1483
2023-09-01 08:32:28 +02:00
kolaente a21bff3ffb fix: compile errors 2023-05-24 15:52:32 +02:00
kolaente abe5f72493 fix(migration): enable insert from structure work recursively 2023-05-24 15:51:56 +02:00
kolaente 906574adc9 fix(project): remove comments, clarifications, notifications about namespaces 2023-05-24 15:51:54 +02:00
kolaente ac0d84a7d8 feat(migration): ignore namespace changes 2023-05-24 15:51:54 +02:00
kolaente 386e218b95 feat(migration): use new structure for migration 2023-05-24 15:51:54 +02:00
kolaente 349e6a5905 feat: rename lists to projects 2023-03-13 14:28:06 +01:00
kolaente 682123a9c9 fix(migration): todoist pagination now avoids too many loops 2023-01-24 22:27:57 +01:00
renovateandkonrad c5bd09702a chore(deps): update dependency golang to v1.19 (#1228)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/1228
Co-authored-by: renovate <renovatebot@kolaente.de>
Co-committed-by: renovate <renovatebot@kolaente.de>
2022-10-01 15:05:12 +00:00
kolaenteandGitea d3bdafb717 fix: decoding images for blurHash generation 2022-03-30 16:36:07 +00:00
kolaenteandGitea 7fa0865188 fix: lint 2022-03-30 16:36:07 +00:00
kolaenteandGitea f83b09af59 feat: generate a BlurHash when uploading a new image 2022-03-30 16:36:07 +00:00
kolaente 8bb3f8d37c fix: importing archived lists or namespaces 2021-12-12 13:18:01 +01:00
konrad 90146aea5b User Data Export and import (#967)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/967
Co-authored-by: konrad <k@knt.li>
Co-committed-by: konrad <k@knt.li>
2021-09-04 19:26:31 +00:00
kolaente 5b825f1cc8 Make sure a bucket exists or use the default bucket when importing tasks 2021-07-08 10:34:03 +02:00
kolaente 8b6aeb8571 Fix lint 2021-07-07 20:53:26 +02:00
kolaente 0c5dfe5c48 Better logging for errors while importing a bunch of tasks 2021-07-06 18:14:40 +02:00
kolaente d7932d2648 Don't fail when removing the last bucket in migration from other services 2021-07-06 15:43:38 +02:00
konradandkolaente 0ab9ce9ec4 Add events (#777)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/777
Co-authored-by: konrad <konrad@kola-entertainments.de>
Co-committed-by: konrad <konrad@kola-entertainments.de>
2021-02-02 22:48:37 +00:00