Commit Graph

22 Commits

Author SHA1 Message Date
kolaente 93f7dd611a
fix: reset id before creating
(cherry picked from commit c252c8f0cd)
2024-09-20 14:26:51 +02:00
kolaente 0a29a88a26
chore(subscription): return subscription entity type using json Marshaler
(cherry picked from commit b60efbd259)
2024-09-20 14:22:43 +02:00
kolaente 95ef4e1045
fix(subscriptions): do not panic when a task does not have a subscription
(cherry picked from commit 75f3e930cd)
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 4ff8815fe1)
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 115d1c3618)
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 06305eb6b3)
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 2c9becec10)
2024-09-20 14:22:29 +02:00
kolaente 4c73c74587
chore(web): move web handler package to Vikunja
(cherry picked from commit 2063da9eec)
2024-09-20 14:22:08 +02:00
kolaente 1a131d79f9
fix(subscriptions): ignore task subscription when the user is subscribed to the project
Resolves https://community.vikunja.io/t/e-mail-notification-twice/2740/12
Resolves https://github.com/go-vikunja/vikunja/issues/316

(cherry picked from commit efde364224)
2024-09-20 14:21:11 +02:00
kolaente fe27dd59ad
feat(subscription): use a recursive cte to fetch subscriptions of parent projects
Testing this locally resulted in improved response times from ~50ms to ~20ms when creating a project. It looks like even though the code running these sql queries uses different go routines, they affect each other (caused by IO or context switching?)
2024-03-03 15:34:18 +01:00
kolaente 10ff864e0c
fix(projects): load projects only one when fetching subscriptions for a bunch of projects at once
This change ensures already loaded projects are passed down when fetching their subscription  instead of re-loading each project with a single sql statement. When loading all projects, this meant all projects were loaded twice, which was highly inefficient. This roughly added 25ms to each request, assuming the per page limit was maxed out at 50 projects.

Empirical testing shows this change reduces load times by ~20ms. Because the request is already pretty fast, this is ~30% of the overall request time, making the loading of projects now even faster
2024-03-02 14:27:11 +01:00
kolaente d38050f2b8
fix(subscriptions): don't crash when a project is already deleted 2024-01-26 23:53:22 +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 b5194624e0
fix: don't try to load subscriptions for nonexistent projects 2023-07-03 18:18:13 +02:00
kolaente ebc3dd2b3e
fix: lint errors 2023-05-24 15:51:57 +02:00
kolaente ceaa9c0e03
feat(subscriptions): make sure all subscriptions are inherited properly 2023-05-24 15:51:55 +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
Luca Bernstein 3adfeb3b34 fix(namespaces): add list subscriptions (#1254)
Add list subscriptions to namespaces call to enable frontend to show subscription state correctly.

Resolves https://github.com/go-vikunja/frontend/issues/75

Reviewed-on: https://kolaente.dev/vikunja/api/pulls/1254
Reviewed-by: konrad <k@knt.li>
Co-authored-by: Luca Bernstein <luca@lucabernstein.com>
Co-committed-by: Luca Bernstein <luca@lucabernstein.com>
2022-09-29 09:49:24 +00:00
kolaente e23014dbe4
Fix swagger docs for create requests 2021-05-26 21:56:31 +02:00
kolaente 73f2d4532d
Make sure all tables are properly pluralized 2021-03-28 20:17:35 +02:00
konrad e7875ecb3b Subscriptions and notifications for namespaces, tasks and lists (#786)
Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/786
Co-authored-by: konrad <konrad@kola-entertainments.de>
Co-committed-by: konrad <konrad@kola-entertainments.de>
2021-02-14 19:18:14 +00:00