1382 Commits

Author SHA1 Message Date
25fd0f6108
fix(filter): correctly create task positions during filter creation
All checks were successful
continuous-integration/drone/push Build is passing
This fixes a bug where a saved filter would contain many "dead" entries for tasks which are not part of that filter. These entries were "dead" because the filter would not match for them and thus they were not shown.
The problem was caused by a routine during the creation of the filter where all projects from all matching tasks would be used as input for fetching the tasks to add to task_positions.

https://community.vikunja.io/t/not-able-to-move-task-between-buckets-within-a-kanban-view-for-saved-filter/2882/3
2024-12-09 19:21:13 +01:00
942c2e4af6
fix: specify cols when upgrading
Some checks failed
continuous-integration/drone/push Build is failing
Resolves https://github.com/go-vikunja/vikunja/issues/367
2024-12-09 17:42:31 +01:00
ed5474a28a fix(typo): Simpl -> Simple -> GetProjectsMapSimpleByTaskIDs (#2906)
Some checks failed
continuous-integration/drone/push Build is failing
Fix typo -> GetProjectSimplByTaskID -> GetProjectSimpleByTaskID

Reviewed-on: #2906
Co-authored-by: graves501 <graves501@protonmail.com>
Co-committed-by: graves501 <graves501@protonmail.com>
2024-12-09 13:55:16 +00:00
8d8406df05
fix: task overdue at the same time as the notification
All checks were successful
continuous-integration/drone/push Build is passing
If a task is overdue at the same time the notification is sent, it would contain a message like "overdue since" without a time. This now shows "overdue now" instead.
2024-12-03 08:33:16 +01:00
8732837596
chore: simplify sentry code
All checks were successful
continuous-integration/drone/push Build is passing
2024-11-22 12:05:02 +01:00
3659b7b58d
fix(attachments): check permissions when accessing all attachments
All checks were successful
continuous-integration/drone/push Build is passing
2024-11-21 15:42:53 +01:00
bbbd936868
fix(saved filters): check permissions when accessing tasks of a filter 2024-11-21 15:42:26 +01:00
a5cc5e3783 Add healthcheck command (#2856)
Some checks failed
continuous-integration/drone/push Build is failing
Currently vikunja has a `/health` endpoint that was added in #998. Docker/compose cannot utilize this feature since vikunja's docker image doesn't have curl/wget as it is pruned which is great for the image size. This PR adds a `healthcheck` command that send an http request to `/health` and exits with 0 or non-zero depending on the result.
It also adds a `HEALTHCHECK` to the docker image which calls this automatically.

Reviewed-on: #2856
Reviewed-by: konrad <k@knt.li>
Co-authored-by: ScribblerCoder <omar2001.oh@gmail.com>
Co-committed-by: ScribblerCoder <omar2001.oh@gmail.com>
2024-11-20 18:04:55 +00:00
f2eac4623d
fix(filters): do not crash when paginating bucket with empty filter
All checks were successful
continuous-integration/drone/push Build is passing
Resolves https://community.vikunja.io/t/error-in-kanban-view-of-virtual-project-saved-filter/2876/7
2024-11-19 19:32:09 +01:00
0b9fd2c485
fix(project): correctly set done bucket after duplicating project
Some checks failed
continuous-integration/drone/push Build is failing
Resolves https://community.vikunja.io/t/duplicating-projects-with-a-kanband-done-bucket-is-broken/2979
2024-11-19 19:23:08 +01:00
Frederick [Bot]
940b450a56 [skip ci] Updated swagger docs 2024-11-19 16:44:45 +00:00
d616bab76d fix(views): enable search in bucket filters
All checks were successful
continuous-integration/drone/push Build is passing
2024-11-19 16:27:22 +00:00
624907ad6a fix: make search in saved filter work 2024-11-19 16:27:22 +00:00
3bafaa7101 fix(tasks): also delete corresponding task positions (#2840)
All checks were successful
continuous-integration/drone/push Build is passing
Closes [#348](https://github.com/go-vikunja/vikunja/issues/348)

When moving a project, the old task bucket entries (project, saved
filters) will be removed, but not the corresponding position. This has
the effect that the saved_filter event hook UpdateTaskInSavedFilterViews
wrongly assumes that the task doesn't need to be re-added to the saved
filter since the position part still exists.

Reviewed-on: https://kolaente.dev/vikunja/vikunja/pulls/2840
Co-authored-by: Maximilian Bosch <maximilian@mbosch.me>
Co-committed-by: Maximilian Bosch <maximilian@mbosch.me>
2024-11-18 16:02:05 +00:00
b8c4e0a91e
fix(openid): log error when config is still using array value
All checks were successful
continuous-integration/drone/push Build is passing
2024-11-18 12:16:38 +01:00
feb6b708e3
fix(tasks): prefix created and updated columns when sorting by them
Some checks failed
continuous-integration/drone/push Build is failing
Resolves https://github.com/go-vikunja/vikunja/issues/350
2024-11-18 12:07:29 +01:00
bd3eab8c34
fix(filters): validate filter expression when creating or updating filter
All checks were successful
continuous-integration/drone/push Build is passing
Resolves https://github.com/go-vikunja/vikunja/issues/354
2024-11-18 11:02:21 +01:00
1db1333d8a
chore(config): append .file to config values when reading
All checks were successful
continuous-integration/drone/push Build is passing
2024-11-18 10:35:02 +01:00
05349ddb5c
feat!: config for auth providers now use a map instead of an array
The config values for openid providers now use a map with the provider as key instead of an array. For example before:

auth:
  openid:
    providers:
      - name: foo
        clientid: ...

now becomes:

auth:
  openid:
    providers:
      foo:
        clientid: ...

This allows us to read values for openid providers from files using the same syntax as everywhere and makes the configuration more predictable. It also allows configuring providers through env variables, though it is still required to set at least one value via the config file because Vikunja won't discover the provider otherwise.
2024-11-18 10:34:30 +01:00
3479fa1228
feat(config): only read file sub-keys from files
All checks were successful
continuous-integration/drone/push Build is passing
This removes reading config values from _file and instead only reads from file sub keys. This should make it easier to not accidentally specify the same value twice.
The syntax via env does not change, but via a config file this:

database:
  password_file: foo

becomes

database:
  password:
    file: foo
2024-11-18 08:52:21 +01:00
c7914bc245
feat: load any config value from file
Some checks failed
continuous-integration/drone/push Build is failing
This change allows to read any config value from a file, when the path to that file is specified in the config with the target config value suffixed with _file. This works with environment variables as well.
For example, setting database.password_file=/path/to/password will load the value from /path/to/password and set it as the config value of database.password.

Resolves #704
Resolves #1621
2024-11-04 16:47:39 +01:00
4556cfb057
fix(attachments): return error message when attachment upload is not multipart form request
Some checks failed
continuous-integration/drone/push Build is failing
Resolves https://vikunja.sentry.io/issues/6041469388/
2024-11-04 12:26:53 +01:00
3f62c013ba
fix(typesense): fetch task comments without permission check
Some checks failed
continuous-integration/drone/push Build is failing
Fetching the task comments during indexing would always check the permissions - in the specific case of indexing comments into Typesense, this will always return true, because we're checking with the owner of the project. Because this is a rather expensive operation, it is even more unnecessary.
2024-11-02 18:42:12 +01:00
e393cfdfd7
fix(views): delete task buckets and task positions as well when deleting a view
Some checks failed
continuous-integration/drone/push Build is failing
2024-10-31 19:22:51 +01:00
1fac81c8de
feat(cli): add cli command to delete orphan task positions
Some checks failed
continuous-integration/drone/push Build is failing
2024-10-31 19:19:56 +01:00
d03f9c7b73
fix(positions): directly look in the database to fetch tasks when recalculating their position
Some checks failed
continuous-integration/drone/push Build is failing
2024-10-31 19:02:15 +01:00
d7eff8e43b
feat(positions): add more debug logs
Some checks failed
continuous-integration/drone/push Build is failing
2024-10-31 18:46:09 +01:00
7f5f5a4b8d
fix(events): do not crash filter event handler when triggered by a link share user
Some checks failed
continuous-integration/drone/push Build is failing
Resolves https://vikunja.sentry.io/issues/6030883119/events/4013802889b64b6b9d868e7c83ba4eb5/
2024-10-30 14:49:33 +01:00
d081cf80fc
chore(caldav): refactor fetching projects
Some checks failed
continuous-integration/drone/push Build is failing
2024-10-30 08:37:27 +01:00
b9366ca9e3
fix(filter): use correct syntax for not in query in typesense
Some checks failed
continuous-integration/drone/push Build is failing
Related to https://github.com/typesense/typesense/issues/2038
2024-10-29 17:23:16 +01:00
57c6f2cd10
feat(filters): add "not in" operator for filters
Some checks failed
continuous-integration/drone/push Build is failing
Resolves https://community.vikunja.io/t/feature-requests-regarding-view-ordering-project-reference-in-kanban-and-a-notin-operator/2728
2024-10-29 12:03:16 +01:00
412a8ef654
chore(projects): only pass users to checks
All checks were successful
continuous-integration/drone/push Build is passing
2024-10-29 09:11:06 +01:00
816da6bc50
fix(projects): check with the current user if they have access to the project
All checks were successful
continuous-integration/drone/push Build is passing
2024-10-29 08:40:14 +01:00
dace07efda
fix(projects): return 0 if no parent project exists
Some checks reported errors
continuous-integration/drone/push Build was killed
2024-10-29 08:25:20 +01:00
fa032a889f
fix(filters): do not crash when a filter is invalid
All checks were successful
continuous-integration/drone/push Build is passing
Resolves https://vikunja.sentry.io/issues/6025547266/events/a62beaa09caf482ba238b18f363956df
2024-10-28 16:16:48 +01:00
e30374a28c
fix(projects): only add conditions to query when they are non-empty
Some checks failed
continuous-integration/drone/push Build is failing
2024-10-28 16:09:31 +01:00
b013b294e2
fix(projects): remove unnecessary join
The removal of the unnecessary join condition speeds up the query 10x. Before, it would take ~700ms on Vikunja Cloud. With this removal, the otherwise same query now takes ~70ms (which still leaves plenty of room for improvements, but it's already a great step forwards).
2024-10-28 15:58:07 +01:00
acdb45a92c
fix: lint
All checks were successful
continuous-integration/drone/push Build is passing
2024-10-28 14:04:54 +01:00
29107e9865
fix: error message check on mysql
Some checks failed
continuous-integration/drone/push Build is failing
2024-10-28 13:50:12 +01:00
a70c472aa3
fix: create missing indexes on postgres
Some checks failed
continuous-integration/drone/push Build is failing
2024-10-28 13:25:38 +01:00
e1893ff573
chore: cleanup 2024-10-28 12:44:54 +01:00
106a1c7864
fix(events): report async errors via Sentry
Some checks failed
continuous-integration/drone/push Build is failing
2024-10-28 12:44:26 +01:00
7055d7341c
feat(sharing): add config so that users only find members of their teams
All checks were successful
continuous-integration/drone/push Build is passing
This adds a feature where you can enable users to only find members of teams they're part of. This makes the user search when sharing projects less confusing, because users only see other users they already know.
It is still possible to add users to teams with their email address, if they have that enabled in the user settings.
2024-10-28 11:08:06 +01:00
28d5cd7b28 feat: allow setting schema for connection in postgres (#2777)
All checks were successful
continuous-integration/drone/push Build is passing
This PR introduce a new config for database, `database.schema`, allowing user to specify a specific schema to use for their postgres database connection. As the default value is set, it will be backward compatible.

Related discussion: https://community.vikunja.io/t/postgres-database-has-error-pq-relation-tasks-does-not-exist/1333

Reviewed-on: #2777
Co-authored-by: John Doe <hugosum.dev@protonmail.com>
Co-committed-by: John Doe <hugosum.dev@protonmail.com>
2024-10-26 16:06:47 +00:00
b5cbe99b0a
fix(cmd): report error when the connection to the mail server failed
All checks were successful
continuous-integration/drone/push Build is passing
When running the testmail command, Vikunja would not stop if it wasn't able to connect to the mail server. This was a regression from 950de7c954ef3799051d73bc9b728558cf166377.
This change fixes that problem.

Resolves #2767
2024-10-25 19:23:39 +02:00
d784e98f8c feat(cmd): Allow to specify custom filename for dump command (#2775)
All checks were successful
continuous-integration/drone/push Build is passing
This simplifies automated postprocessing of the backup file.

Co-authored-by: Maarten <mail@mgrothus.de>
Reviewed-on: #2775
Co-authored-by: Sterad <hgasuser@gmail.com>
Co-committed-by: Sterad <hgasuser@gmail.com>
2024-10-25 12:37:17 +00:00
1f76a8bb64 feat: preferably award admin access to project users with write access on user deletion (#2772)
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #2772
Co-authored-by: Sterad <hgasuser@gmail.com>
Co-committed-by: Sterad <hgasuser@gmail.com>
2024-10-24 20:42:38 +00:00
3ad5797307
fix: do not prefix tasks all the time
All checks were successful
continuous-integration/drone/push Build is passing
Fixes a regression from 29b90010785ae2e95b1abd99fa9740f18987eabb
2024-10-21 10:32:14 +02:00
29b9001078
feat(filters): allow filtering by created and updated task fields
Some checks failed
continuous-integration/drone/push Build is failing
Resolves #2768
2024-10-18 15:15:19 +02:00
Frederick [Bot]
5eebfb3371 [skip ci] Updated swagger docs 2024-10-15 10:42:30 +00:00