Commit Graph

1323 Commits

Author SHA1 Message Date
kolaente
d81f2db6ef chore: replace all uses of bucket_id with the const 2024-10-02 10:43:51 +02:00
kolaente
425f6378c6 fix(kanban): make loading tasks for a bucket work
This fixes two closely-related bugs:
1. When loading tasks from a bucket of a saved filter, the saved filter query would override the user-supplied filter, which would cause to only tasks matching the saved filter query to be returned.
2. When a filter query for a bucket was specified, the function would only check if one of the top level filters was a filter for tasks in a specific bucket. That means a filter like "bucket_id = 42 && labels = foo" would return the expected result, while a filter like "labels = foo && (bucket_id = 42 && priority = 1)" would fail with an error 500 because the task_buckets table was not joined to the sql query. The fix from the first bug caused such filter queries.
2024-10-02 10:41:38 +02:00
kolaente
80d22d5060 fix(colors): truncate longer hex color values
Resolves https://vikunja.sentry.io/share/issue/6f1e37d4b8b248188e20650234a45cde/
2024-09-30 20:06:10 +02:00
kolaente
1eaeb8d003 fix(filters): change assertion based on the environment 2024-09-30 19:54:00 +02:00
kolaente
8d05b5cb01 fix(filters): return more details when the provided filter time zone is invalid 2024-09-30 08:42:16 +02:00
kolaente
754d56ca82 fix(filters): increase year value when using mysql and year < 1
Mysql cannot handle year values < 1. That means filtering for a date value like 0000-01-01 won't work with mysql. Additionally, dates like 0001-01-01 could under some circumstances not work either when the date in combination with the time zone would resolve to something like 0000-12-31 - for example when the server is located (and configured) in UTC, but the user running the query is in New York. This could be observed by setting the time zone manually using the filter_timezone query parameter.

Resolves https://vikunja.sentry.io/share/issue/42bce92c15354c109eb1e6488b6a542b/
Resolves https://vikunja.sentry.io/share/issue/ef81451b0c7b43f1bff2d3a86ba393bb/
2024-09-30 08:41:24 +02:00
kolaente
d22bc79d3c chore(tasks): add more details to error message
Trying to debug https://vikunja.sentry.io/share/issue/ef81451b0c7b43f1bff2d3a86ba393bb/
2024-09-29 21:44:28 +02:00
kolaente
1fe5e9cc55 chore(tasks): add more details to error message
Trying to debug https://vikunja.sentry.io/share/issue/ef81451b0c7b43f1bff2d3a86ba393bb/
2024-09-29 21:05:55 +02:00
kolaente
5478acfc09 fix(files): configure the files path in files init instead of globally
This fixes a regression introduced in daa7ad053c where the root path would be included twice in the file path, leading to retrieval issues.
2024-09-29 19:04:25 +02:00
kolaente
287d4f7de2 fix(filters): make sure year is always at least 1
Resolves https://vikunja.sentry.io/share/issue/ef81451b0c7b43f1bff2d3a86ba393bb/
Resolves https://github.com/go-vikunja/app/issues/94#issuecomment-2351818484
2024-09-29 18:56:46 +02:00
kolaente
daa7ad053c feat: auto tls
This commit introduces the automatic retrieval of TLS certificates from Let's Encrypt. If the feature is enabled, Vikunja will automagically request a certificate from Let's Encrypt and configure it to server content via TLS.
2024-09-29 18:20:30 +02:00
kolaente
ca967782e8 fix(filters): explicitly search in json when using postgres
Resolves https://github.com/go-vikunja/vikunja/issues/330
Resolves https://community.vikunja.io/t/add-task-to-filter-view-cron-error-fetching-filters-pq-operator-does-not-exist-json-unknown/2831
2024-09-29 11:39:44 +02:00
jd
84dbc5fd84 fix: partial fix to allow list tasks in ios reminders app (#2717)
This PR introduces a partial fix for the CalDAV task listing bug (#753) when handling PROPFIND requests with `Depth: 1`, improving task visibility in the iOS Reminders app.

Notes:
* This might make Thunderbird somewhat usable when interacting with tasks using the `/dav/projects/{id} url`.
* This does not fully resolve the issue where the Reminders app will only display the last project after some time when adding the URL.

This is my first time working with Golang and CalDAV, so I’d really appreciate any feedback or suggestions on the code structure, style, or any improvements I could make.

Co-authored-by: JD <43763092+jdw1023@users.noreply.github.com>
Reviewed-on: https://kolaente.dev/vikunja/vikunja/pulls/2717
Reviewed-by: konrad <k@knt.li>
Co-authored-by: jd <jd@noreply.kolaente.dev>
Co-committed-by: jd <jd@noreply.kolaente.dev>
2024-09-28 09:06:32 +00:00
kolaente
261c6e6c9e fix(files): only use service rootpath for files when the files path is not absolute
Resolves https://community.vikunja.io/t/images-failing-to-load-500-internal-server-error/2835
2024-09-23 14:41:00 +02:00
kolaente
207b88a286 fix(typesense): use typesense bulk insert, log all errors 2024-09-20 10:20:18 +02:00
kolaente
50a0674835 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.
2024-09-20 10:13:05 +02:00
kolaente
8181829c9e fix(typesense): index tasks one by one 2024-09-20 09:18:57 +02:00
kolaente
83aeb90376 chore(logging): simplify log template string 2024-09-20 08:42:22 +02:00
kolaente
e4584109df chore(typesense): add more debug logging 2024-09-20 08:42:21 +02:00
kolaente
3f1d0f390b fix(typesense): use emplace instead of upsert to update documents 2024-09-20 07:54:23 +02:00
kolaente
edf206aba6 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
2024-09-19 15:57:18 +02:00
kolaente
9e39ef9397 fix(typesense): add new tasks to typesense properly
Maybe related to https://github.com/go-vikunja/vikunja/issues/317
2024-09-19 15:30:14 +02:00
kolaente
c54181eeda fix(deps): update module github.com/typesense/typesense-go to v2 2024-09-19 15:30:13 +02:00
kolaente
b3bf92b7ce fix(typesense): only fail silently when a project was not found during indexing 2024-09-19 15:30:13 +02:00
kolaente
cd0ab54d57 fix(views): add migration for filtered kanban buckets 2024-09-19 13:23:23 +02:00
kolaente
4b2b8e3b83 chore: rearrange cron registers 2024-09-19 11:24:43 +02: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
2123da49a3 fix(task): cleanup old task positions and task buckets when adding an updated or created task to filter 2024-09-19 09:30:21 +02:00
kolaente
c53a761396 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
2024-09-19 09:30:20 +02:00
kolaente
c84b50b3ee fix(labels): trigger task updated for bulk label task update 2024-09-19 08:59:34 +02:00
kolaente
c252c8f0cd fix: reset id before creating 2024-09-17 10:46:14 +02:00
kolaente
6f27e1401a fix(user): do not create user with existing id
Resolves https://vikunja.sentry.io/share/issue/6f1e37d4b8b248188e20650234a45cde/
2024-09-14 12:16:05 +02:00
kolaente
1451f6e46f fix(kanban): correctly paginate filtered kanban buckets
Resolves https://github.com/go-vikunja/vikunja/issues/314
2024-09-14 09:37:21 +02:00
kolaente
45ff5907e6 fix(view): correctly resolve bucket filter when paginating 2024-09-13 19:45:48 +02:00
kolaente
1a8f12ac13 fix(kanban): do not mark first bucked as done bucket in filter bucket mode
Resolves https://github.com/go-vikunja/vikunja/issues/313
2024-09-13 11:52:44 +02:00
Frederick [Bot]
9dd95101f9 [skip ci] Updated swagger docs 2024-09-12 08:42:38 +00:00
kolaente
20724f6fb5 fix(task): cyclomatic complexity 2024-09-12 10:24:16 +02:00
kolaente
8d730543c3 fix(project): reset id before creating
Resolves https://vikunja.sentry.io/share/issue/6f1e37d4b8b248188e20650234a45cde/
2024-09-11 23:46:13 +02:00
kolaente
55dd7d2981 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
2024-09-11 17:58:42 +02:00
kolaente
44a43b9f86 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/
2024-09-10 18:23:06 +02:00
kolaente
1085a6583b fix(caldav): reject invalid project id with error 400
Resolves https://vikunja.sentry.io/share/issue/6fc18edefa0e4db3b2e10efe36deeaa4/
2024-09-10 17:32:35 +02:00
kolaente
e698ac5a34 fix(label): ignore existing ID during creation 2024-09-10 16:45:40 +02:00
Frederick [Bot]
2539f15dfb [skip ci] Updated swagger docs 2024-09-07 11:48:49 +00:00
kolaente
5c1b2846a1 docs(api): use correct return type for the /user endpoint 2024-09-07 13:27:06 +02:00
Frederick [Bot]
2b8515b91d [skip ci] Updated swagger docs 2024-09-06 11:18:51 +00:00
kolaente
68636f27da fix(files): use absolute path everywhere 2024-09-06 12:59:48 +02:00
kolaente
cf94cc8cab chore(docs): clarify usage of related model creation
Resolves https://github.com/go-vikunja/vikunja/issues/323
2024-09-06 12:06:12 +02:00
kolaente
02c1de55c4 chore(attachments): refactor building image preview 2024-09-06 09:43:59 +02:00
kolaente
9d7b6d3d9a feat(dump): add flag to allow specifying dump path
Resolves https://community.vikunja.io/t/vikunja-0-24-docker-bin-sh/2621/3
2024-09-05 15:14:03 +02:00
kolaente
c2b116de70 chore(files): use absolute file path to retrieve and save files 2024-09-05 15:03:32 +02:00