1
0

1308 Commits

Author SHA1 Message Date
kolaente
724ec5751f
fix(attachment): do not use image previews
Image previews were partially backported from main which caused error messages because some parts are missing.

Resolved https://community.vikunja.io/t/preview-size-is-not-defined/2843
2024-09-29 11:59:18 +02:00
kolaente
17618301bc
Revert "chore(attachments): refactor building image preview"
This reverts commit e70f5bcce39ae19060be62aec8b75f75c26d1b9e.
2024-09-29 11:54:20 +02:00
kolaente
a0ad6e7d28
fix(typesense): use typesense bulk insert, log all errors
(cherry picked from commit 207b88a286dc9881034af9d9d117d67e8ae3c91f)
2024-09-20 14:28:02 +02:00
kolaente
940d149e2a
fix(typesense): force position to always be float instead of auto-inferring
This fixes an issue where it would be impossible to update a task in Typesense when the position for a view of it was previously saved as int64. This happened because the field is created per view on demand and its type is automatically inferred from the data saved. Now, when the first value for a particular position field is a float which could as well be an int (for example, 42.0), that field gets created as an int64 instead of float. Subsequent tries to save a float into that field will then fail.

Additionally, errors about this are silently discarded when using bulk insert. That's why the problem was not really debuggable at first.

(cherry picked from commit 50a0674835c65b3eb2f0e1f2dd8ae53e9d997eda)
2024-09-20 14:28:00 +02:00
kolaente
802f661f0d
fix(typesense): index tasks one by one
(cherry picked from commit 8181829c9efde3b210d6bc8f1640f469f8887973)
2024-09-20 14:27:59 +02:00
kolaente
f9829a6338
chore(logging): simplify log template string
(cherry picked from commit 83aeb90376a2b14ca22da19f206cefdb8448175b)
2024-09-20 14:27:58 +02:00
kolaente
a87419fa07
chore(typesense): add more debug logging
(cherry picked from commit e4584109dfc39099dff0de174c49fa87d02a2c0e)
2024-09-20 14:27:55 +02:00
kolaente
4cbed7c2ed
fix(typesense): use emplace instead of upsert to update documents
(cherry picked from commit 3f1d0f390bddd05992f7ad1170ddfbda0bb3aec7)
2024-09-20 14:27:50 +02:00
kolaente
25c8476883
fix(typesense): make sure task positions are recreated properly when updating them
Related https://community.vikunja.io/t/version-0-24-0-internal-server-error-breaking-change/2558
Related https://github.com/go-vikunja/vikunja/issues/317

(cherry picked from commit edf206aba61678ecc15db981ae6caf99d80c8010)
2024-09-20 14:27:49 +02:00
kolaente
15cde08db6
fix(typesense): add new tasks to typesense properly
Maybe related to https://github.com/go-vikunja/vikunja/issues/317

(cherry picked from commit 9e39ef939786d175a2036166de4c2c8be550b295)
2024-09-20 14:27:46 +02:00
kolaente
96835f6a28
fix(deps): update module github.com/typesense/typesense-go to v2
(cherry picked from commit c54181eeda593ab0c06e4358802d442338ffa5bf)
2024-09-20 14:27:44 +02:00
kolaente
b1c4f0c216
fix(typesense): only fail silently when a project was not found during indexing
(cherry picked from commit b3bf92b7ce15576f41f4109c02dd2bc005a58575)
2024-09-20 14:27:42 +02:00
kolaente
a751178c8b
fix(views): add migration for filtered kanban buckets
(cherry picked from commit cd0ab54d572a5187ced45ee15da149be36c3553c)
2024-09-20 14:27:38 +02:00
kolaente
4857bfbbdb
chore: rearrange cron registers
(cherry picked from commit 4b2b8e3b83caad72bd9a1574f9967bed8e06d3d7)
2024-09-20 14:27:28 +02:00
kolaente
62c238e4bc
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

(cherry picked from commit bc52da4029170bfd10cddea28cf5c6983969cb42)
2024-09-20 14:27:26 +02:00
kolaente
d27b62db6e
fix(task): cleanup old task positions and task buckets when adding an updated or created task to filter
(cherry picked from commit 2123da49a38e8683a2a0272b89617634d45f7f45)
2024-09-20 14:27:23 +02:00
kolaente
a21036340e
fix(task): add task to filter view after it was updated
Maybe resolves https://community.vikunja.io/t/tasks-in-saved-filter-appear-in-list-view-but-are-not-visible-in-kanban-view/2800

(cherry picked from commit c53a76139616b9cfbdc748a5e6caf23585517e42)
2024-09-20 14:27:21 +02:00
kolaente
3398dee481
fix(labels): trigger task updated for bulk label task update
(cherry picked from commit c84b50b3ee793091f5501fa65129c168e728565e)
2024-09-20 14:27:19 +02:00
kolaente
93f7dd611a
fix: reset id before creating
(cherry picked from commit c252c8f0cd1c09a74b564e67a855cca4cd436585)
2024-09-20 14:26:51 +02:00
kolaente
fd7d83bdaf
fix(user): do not create user with existing id
Resolves https://vikunja.sentry.io/share/issue/6f1e37d4b8b248188e20650234a45cde/

(cherry picked from commit 6f27e1401ae00710b1ec5df3cad3fcd6193d455b)
2024-09-20 14:26:40 +02:00
kolaente
971f328256
fix(kanban): correctly paginate filtered kanban buckets
Resolves https://github.com/go-vikunja/vikunja/issues/314

(cherry picked from commit 1451f6e46f03c30384834ff99e0cbe7f15958536)
2024-09-20 14:26:39 +02:00
kolaente
1049b27d37
fix(view): correctly resolve bucket filter when paginating
(cherry picked from commit 45ff5907e69b24f00926841790d0f4f3d11e530a)
2024-09-20 14:26:34 +02:00
kolaente
8e32d099c4
fix(kanban): do not mark first bucked as done bucket in filter bucket mode
Resolves https://github.com/go-vikunja/vikunja/issues/313

(cherry picked from commit 1a8f12ac137f20745895a5c3b828683324b82dc4)
2024-09-20 14:26:31 +02:00
Frederick [Bot]
eb6663e1f5
[skip ci] Updated swagger docs
(cherry picked from commit 9dd95101f9b695a16c1ff755442194f54ace154b)
2024-09-20 14:26:01 +02:00
kolaente
b94802169c
fix(task): cyclomatic complexity
(cherry picked from commit 20724f6fb57128fd212544cb3a6b55b90f38c316)
2024-09-20 14:26:00 +02:00
kolaente
d23484c8f3
fix(project): reset id before creating
Resolves https://vikunja.sentry.io/share/issue/6f1e37d4b8b248188e20650234a45cde/

(cherry picked from commit 8d730543c3c7bbb8e4f3a8b18022275a35ce5330)
2024-09-20 14:25:57 +02:00
kolaente
5bfd99dd77
fix(task): specify task index when creating multiple tasks at once
This change allows to specify the task index when creating a task, which will then be checked to avoid duplicates and used. This allows us to calculate the indexes for all tasks beforehand when creating them at once using quick add magic.
The method is not bulletproof, but already fixes a problem where multiple tasks would have the same index when created that way.

Resolves https://community.vikunja.io/t/add-multiple-tasks-at-once/333/16

(cherry picked from commit 55dd7d298187dcc8393ae67340117d66d45dc4ef)
2024-09-20 14:25:48 +02:00
kolaente
ac87035742
fix(auth): restrict max password length to 72 bytes
Bcrypt allows a maximum of 72 bytes. This is part of the algorithm and not something we could change in Vikunja. The solution here was to restrict the password during registration to a max length of 72 bytes. In the future, this should be changed to hash passwords with sha512 or similar before hashing them with bcrypt. Because they should also be salted in that case and the added complexity during the migration phase, this was not implemented yet.
The change in this commit only improves the error handling to return an input error instead of a server error when the user enters a password > 72 bytes.

Resolves https://vikunja.sentry.io/share/issue/e8e0b64612d84504942feee002ac498a/

(cherry picked from commit 44a43b9f8616f11560c9e04f88f3000a6df5338d)
2024-09-20 14:25:46 +02:00
kolaente
01a7a62541
fix(caldav): reject invalid project id with error 400
Resolves https://vikunja.sentry.io/share/issue/6fc18edefa0e4db3b2e10efe36deeaa4/

(cherry picked from commit 1085a6583be733aa39128bde9dcb641be734870d)
2024-09-20 14:25:41 +02:00
kolaente
c5f043c346
fix(label): ignore existing ID during creation
(cherry picked from commit e698ac5a346785df623553104c5650566d1a9bcd)
2024-09-20 14:25:39 +02:00
Frederick [Bot]
be5822712e
[skip ci] Updated swagger docs
(cherry picked from commit 2539f15dfb62689137e1a68a3ca7cbb8e13ac222)
2024-09-20 14:25:27 +02:00
kolaente
a5a54a40f6
docs(api): use correct return type for the /user endpoint
(cherry picked from commit 5c1b2846a1c6a9ea3690ac03d58149c3715f04d4)
2024-09-20 14:25:25 +02:00
Frederick [Bot]
85445ea032
[skip ci] Updated swagger docs
(cherry picked from commit 2b8515b91db6f90becfe150b351120e3b1afc726)
2024-09-20 14:25:03 +02:00
kolaente
0b9f3070fd
fix(files): use absolute path everywhere
(cherry picked from commit 68636f27da707f3ee87ba0e4f1ff100504486608)
2024-09-20 14:25:02 +02:00
kolaente
cca02a3f2e
chore(docs): clarify usage of related model creation
Resolves https://github.com/go-vikunja/vikunja/issues/323

(cherry picked from commit cf94cc8cab1c438eb30e63b0b02819c503b32e20)
2024-09-20 14:25:00 +02:00
kolaente
e70f5bcce3
chore(attachments): refactor building image preview
(cherry picked from commit 02c1de55c4b21863bb7500811e04bc0de9177089)
2024-09-20 14:24:53 +02:00
kolaente
bf08dc2585
chore(files): use absolute file path to retrieve and save files
(cherry picked from commit c2b116de70df335a6a354cf2b3595632c8b49ff1)
2024-09-20 14:23:48 +02:00
kolaente
eb89f68f73
fix(caldav): make sure colors are correctly saved and returned
Resolves https://community.vikunja.io/t/caldav-sync-tasks-org-strips-colour-and-end-date-values/2753/2

(cherry picked from commit ffcc48ec871f50c6732eb2f2cf1a49d41e7f47fe)
2024-09-20 14:22:47 +02:00
Frederick [Bot]
08b4bcaff9
[skip ci] Updated swagger docs
(cherry picked from commit 5aa0b6a0cf7d8b6dc4c064b0b9c01c4ae121be34)
2024-09-20 14:22:45 +02:00
kolaente
0a29a88a26
chore(subscription): return subscription entity type using json Marshaler
(cherry picked from commit b60efbd259466637cd9331e5a2101eced07808e8)
2024-09-20 14:22:43 +02:00
kolaente
313b99e296
fix(reminders): notify subscribed users as well
Resolves https://community.vikunja.io/t/no-reminder-notification-by-e-mail-from-my-colleague/2779

(cherry picked from commit 34ac29fcceec0b9f5f0c3c9fb22c015858f357d5)
2024-09-20 14:22:41 +02:00
kolaente
95ef4e1045
fix(subscriptions): do not panic when a task does not have a subscription
(cherry picked from commit 75f3e930cd8072fc6709d1e653b177263d02c8ce)
2024-09-20 14:22:39 +02:00
kolaente
8b8ec19bb3
fix(subscriptions): cleanup and simplify fetching subscribers for tasks and projects logic
Vikunja now uses one recursive CTE and a few optimizations to fetch all subscribers for a task or project. This makes the relevant code easier to maintain and more performant.

(cherry picked from commit 4ff8815fe1bfe72e02c10f6a6877c93a630f36a4)
2024-09-20 14:22:37 +02:00
kolaente
c8f7a57566
fix(subscription): always return task subscription when subscribed to task and project
(cherry picked from commit 115d1c3618811560b4f2c87d764da196bafc1c06)
2024-09-20 14:22:34 +02:00
kolaente
fc8252e751
fix(subscriptions): correctly inherit subscriptions
Resolves https://community.vikunja.io/t/e-mail-notification-twice/2740/20

(cherry picked from commit 06305eb6b3300bf1c989e06e54766e427bcc749a)
2024-09-20 14:22:33 +02:00
kolaente
a462697b30
fix(notifications): only add project subscription as task subscription when the user is not already subscribed to the task
Before this fix, a project subscription object was added twice to the list of subscriptions for a task when the user did not subscribe to the task directly. This caused the user to receive a comment notification twice for a given task.
This was probably a regression from efde364224.

Resolves https://community.vikunja.io/t/e-mail-notification-twice/2740/18

(cherry picked from commit 2c9becec101c14dd744444fffe244510e8394323)
2024-09-20 14:22:29 +02:00
kolaente
5049cbf236
chore(web): always set internal error
(cherry picked from commit 5c56d07215a2a1fac63c565eac669fe8c1f19cbc)
2024-09-20 14:22:28 +02:00
kolaente
a2ef74cade
chore(web): use logger directly
(cherry picked from commit 6fb314b326d530322f1a2e674f250a265268082c)
2024-09-20 14:22:25 +02:00
kolaente
fe44b7d473
chore(web): use web auth factory directly
(cherry picked from commit 9b01666ec6c41f5487cfc6c381b3937f1fe53a16)
2024-09-20 14:22:23 +02:00
kolaente
5fba4ed6ef
chore(web): use config directly
(cherry picked from commit bcfd72c64545241b53fc8a69197cfc6a3f316d92)
2024-09-20 14:22:19 +02:00