Commit Graph

27 Commits

Author SHA1 Message Date
kolaente 49bba7f830 fix: eliminate nested database sessions to prevent table locks
Refactor functions that created their own sessions when called from
within existing transactions, which caused "database table is locked"
errors in SQLite's shared-cache mode.

Changes:
- Add files.CreateWithSession() to reuse caller's session
- Refactor DeleteBackgroundFileIfExists() to accept session parameter
- Add variadic session parameter to notifications.Notify() and
  Notifiable.ShouldNotify() interface
- Update all Notify callers (~17 sites) to pass their session through
- Use files.CreateWithSession in SaveBackgroundFile and NewAttachment
- Fix test code to commit sessions before assertions
2026-02-25 11:03:02 +01:00
kolaente c9c250fb1c fix: add missing Commit() to write callers
After NewSession() auto-begins a transaction, callers that perform
writes must explicitly call Commit() for changes to persist. Without
this, writes are silently rolled back when Close() is called.

Affected callers:
- user deletion notification cron
- caldav token generation/deletion
- token cleanup cron
- mark-all-notifications-read endpoint
- saved filter view cron
- project background delete
- typesense reindex
- export cleanup cron
- task last-updated listener
- saved filter view listener
- SSO team cleanup cron
- migration status start/finish
- background set/remove handlers
- orphaned task position cleanup
- file creation
2026-02-25 11:03:02 +01:00
kolaente 4f31300915 fix(export): use os-level temp file to create user data export 2026-01-08 10:37:51 +01:00
kolaente 15ea38183c
fix: bypass Typesense in user export (#1385) 2025-09-02 15:49:17 +02:00
Dominik Pschenitschni 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 f6bfe2f13c
fix(quick actions): show saved filters in search results
This fixes a bug where saved filters would not show up in quick actions search results. It was caused by explicitely only searching for projects.
During the debugging of this, I've discovered the search parameter is ignored when searching for filters.

Resolves https://community.vikunja.io/t/virtual-projects-a-k-a-saved-filters-do-not-show-up-in-search-bar-results/3180/4
2025-01-21 11:07:28 +01:00
kolaente 70f1b4f28b
fix(export): update only current user export file id 2024-12-22 19:48:47 +01:00
kolaente bc52da4029
fix(filter): make sure tasks are in a correct bucket and position when they are part of a date filter
Whenever a task is part of a date filter, it might fall in or out of a filter bucket without anything changing, other than the current time. For example, a filter condition like due_date > now may include different tasks depending on the current time.
For these kinds of tasks to properly show up in the kanban view of a filter, there has to be an entry in the task_buckets table. These entries only got updated when either a task was updated or the filter itself was updated. To account for th changing of time, we also need to check periodically if tasks are now part or not anymore part of that filter.
This change adds a cron task to do precisely that.
We'll have to see if this works resource-wise, but the cron is not the only one doing a bunch of sql queries so it might be fine after all.

Resolves https://community.vikunja.io/t/tasks-in-saved-filter-appear-in-list-view-but-are-not-visible-in-kanban-view/2800
2024-09-19 11:19:48 +02:00
kolaente 68636f27da
fix(files): use absolute path everywhere 2024-09-06 12:59:48 +02:00
kolaente ebfd5f54d2
fix(migration): ensure project background gets exported and imported 2024-08-12 17:18:07 +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 f364f3bec8
feat(views): return position when retriving tasks 2024-03-19 00:47:48 +01:00
kolaente 7edb53ca12
fix(export): don't crash when an exported file does not exist
Related to https://github.com/go-vikunja/vikunja/issues/110
2024-02-10 13:45:12 +01: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 010b4ce783
feat(tasks): add searching via typesense 2023-08-28 12:14:50 +02:00
kolaente ebc3dd2b3e
fix: lint errors 2023-05-24 15:51:57 +02:00
kolaente 4b55e2ce03
fix(migration): make file migration work with new structure 2023-05-24 15:51:56 +02:00
kolaente fef253312c
feat(projects): cleanup namespace leftovers 2023-05-24 15:51:54 +02:00
kolaente 349e6a5905
feat: rename lists to projects 2023-03-13 14:28:06 +01:00
kolaente 82f4a5ad50
fix(export): ignore file size for export files 2023-01-11 18:56:30 +01:00
kolaente 5cf263a86f
feat: upgrade golangci-lint to 1.45.2 2022-03-27 16:55:37 +02:00
kolaente 465f6d90ab
Fix tasks not exported 2021-09-08 18:40:54 +02:00
kolaente 03d818fd9f
Fix tmp export file created in the wrong path 2021-09-08 17:44:23 +02:00
kolaente f019ae42bb
Fix exporting tasks from archived lists 2021-09-08 17:40:33 +02:00
kolaente 9000f2c3cd
Fix lint 2021-09-07 19:09:44 +02:00
kolaente cc1bb3083f
Don't try to export items which do not have a parent 2021-09-06 22:14:38 +02: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