Richer email notifications

As far as I can tell the set of events that will trigger an email notification is quite limited. Currently seems to be only:

  • New user sign up.
  • Task reminders.
  • Task overdue.

When working with teams I think the following are also very important.

  • Task assigned to user.
  • Comment on task to which user is assigned.
  • Material changes to task to which user is assigned (for example, change of due date).

By the way, there also seems to be no (visible) record of who created a task. When managing teams it is generally quite helpful to know who created a task. This person should also be notified if and when a task is updated.

I had a look at the API source, most recent commit. I’m not a go expert but it looks like ToMail() is implemented on TaskAssignedNotification and .Notify() is called when a task is assigned. So perhaps I’ve misunderstood and notifications are supposed to be sent after all.

Generally, what you’re describing should work when you subscribe to a project or task. The user who created the task is shown in the bottom-right corner, with the creation date.

Thanks, I see the creator now.

Still no emails when assigning or subscribing to tasks though. No logged errors that explicitly mention email, but I am seeing an error of the following form when assignments are made.

2024-01-09T13:36:19.209249192Z: ERROR > models/Handle 125b Event payload does not contain task ID

Could that be related? No mention of assigment in the error itself but it is next to mentions of something/assignees:


It all looks like a bug. I’ll take a closer look.

That looks like an error message related to webhooks.

It looks like this was a race condition where the assignee would be subscribed to the task (due to the assignment) but the notification to subscribers would be sent before that. This is now fixed in e4fec01d52. Please check the next unstable api build (~45min) to verify if this is still a problem.

I’m deployed using a docker-compose with the :latest tag on api and frontend. Looks like it’s still happening for now, but will keep an eye on it. I assume that commit won’t have made it in yet?

The commit should be in there.

Which version are you running? (From the “info” popup in user menu in the frontend)

Apologies, looks like the original issue is fixed. Users do now receive emails when tasks are assigned.

There is still some kind of message handling error but doesn’t seem to affect emails.

vikunja-api-1       | 2024-01-29T12:43:01.295383114Z: ERROR     ▶ events/func1 4b9e Error while handling message 39f402f6-94d4-479f-af73-2930ca7cc29c, reason_poisoned=Error 1146 (42S02): Table 'vikunja.webhooks' doesn't exist, topic_poisoned=task.assignee.created, handler_poisoned=task.assignee.created.webhook.listener, subscriber_poisoned=gochannel.GoChannel,  payload={"task":{"id":161,"title":"Another test task","description":"","done":false,"done_at":"0001-01-01T00:00:00Z","due_date":"0001-01-01T00:00:00Z","reminders":null,"project_id":2,"repeat_after":0,"repeat_mode":0,"priority":0,"start_date":"0001-01-01T00:00:00Z","end_date":"0001-01-01T00:00:00Z","assignees":null,"labels":null,"hex_color":"","percent_done":0,"identifier":"","index":13,"related_tasks":null,"attachments":null,"cover_image_attachment_id":0,"is_favorite":false,"created":"2024-01-29T12:42:51Z","updated":"2024-01-29T12:42:51Z","bucket_id":2,"position":4096,"kanban_position":851968,"created_by":null},"assignee":{"id":6,"name":"","username":"fakename1","created":"2024-01-11T12:47:51Z","updated":"2024-01-11T12:48:38Z"},"doer":{"id":1,"name":"","username":"fakename2","email":"fakeemail2","created":"0001-01-01T00:00:00Z","updated":"0001-01-01T00:00:00Z"}}
vikunja-api-1       | 2024-01-29T12:43:01.45073485Z: ERROR      ▶ events/func1 4ba8 Error while handling message a2a61989-0ce3-4110-b6f6-61c5e6dd69e8, reason_poisoned=Error 1146 (42S02): Table 'vikunja.webhooks' doesn't exist, topic_poisoned=task.updated, handler_poisoned=task.updated.webhook.listener, subscriber_poisoned=gochannel.GoChannel,  payload={"task":{"id":161,"title":"Another test task","description":"\u003cp\u003e\u003c/p\u003e","done":false,"done_at":"0001-01-01T00:00:00Z","due_date":"0001-01-01T00:00:00Z","reminders":null,"project_id":2,"repeat_after":0,"repeat_mode":0,"priority":0,"start_date":"0001-01-01T00:00:00Z","end_date":"0001-01-01T00:00:00Z","assignees":[{"id":6,"name":"fakename1","username":"fakename1l","created":"2024-01-11T12:47:51Z","updated":"2024-01-11T12:48:38Z"}],"labels":null,"hex_color":"","percent_done":0,"identifier":"#13","index":13,"related_tasks":{},"attachments":null,"cover_image_attachment_id":0,"is_favorite":false,"created":"2024-01-29T12:42:51Z","updated":"2024-01-29T12:42:58Z","bucket_id":2,"position":4096,"kanban_position":851968,"created_by":{"id":1,"name":"","username":"fakename2","created":"2024-01-08T13:57:23Z","updated":"2024-01-09T09:31:03Z"}},"doer":{"id":1,"name":"","username":"fakename2","email":"fakeemail2","created":"0001-01-01T00:00:00Z","updated":"0001-01-01T00:00:00Z"}}
1 Like