Tasks in saved filter appear in List view, but are not visible in Kanban view

Hey Team, I am noticing a bug where items a are properly appearing in a saved filter according to my filter logic in List view, but when I switch to the Kanban view, some (but not all) tasks are not appearing, apparently at random. In my “Today” filter view, I have 5 Kanban buckets, and most of projects that hold tasks that appear in my Today filter also have Kanban buckets.

In troubleshooting, I notice that it is not project specific (ie in Kanban view 1 task from a certain project is visible, while another is not). It does not appear that the task’s parent project having Kanban buckets changes the bug behavior. I cannot replicate this, other than seeing it occur.

This is not mission critical as I totally understand the ability to even edit views on a saved filter is brand new and I can also easily check list view, but today, I nearly missed a task because I spent the day looking at my Kanban view, and neglected to switch to List view until later.

Thanks for all your hard work, long live Vikunja!

1 Like

Are you using Typesense?

Can you reproduce this on try?

Not using Typesense, and embarrassed to say I cannot recreate it, but it is happening right now on my personal deployment, where the same filter in list view has 13 tasks, while in Kanban has 11 tasks. the 2 that are missing are from a project that has other tasks correctly appearing in Kanban view.

which version are you using? Are the missing tasks ones you created recently?

  • Version: v0.24.2
  • previously created tasks.

And does this happen with newly created tasks as well?

Yes, I was just now able to create a new task, that appears in list but does not appear in Kanban.

Does this happen with new views as well? Or only with the existing one?

It only happens with newly created filters

But always with the same tasks?

(I can’t reproduce this, hence the many questions)

Different tasks every time. This may be silly, but I can screenshare with you, or email you screenshots (dont want to post internal business items, even with redaction)

Does it only happen with filters? Or with regular projects as well? Can you share the filter queries?

You can send me stuff at konrad@vikunja.io.

Only filters. Both of the below have this issue:

  • (done = false) && ((dueDate < now) || (dueDate >= now/d && dueDate < now+1d/d)) && (project_id in 8,5,9,4,31,51,10,50,11,48,12,6,49,1,18,20,19,21,16,47,13)
  • (done = false) && dueDate >= now/w && dueDate < now/w+1w && (project_id in 8,5,9,4,31,51,10,50,11,48,12,6,49,1,18,21,16,47,13)

And you have the filter set globally, and none on the kanban view?

Yes correct, no filters added to the Edit Views pane, only globally. Kanban bucket configuration is set to manual.

Got your mail, thank you.

I’ve pushed a potential fix for this in c53a761396. It seems like the task was not added to a filter kanban view after it was updated. That would mean, if a task previously did not match the filter,
but now because of the update it matches, it should appear in the filter. Due to the way the kanban view works, this has to happen explicitely and the commit implements that.

If that’s what’s causing the problem, you can work around it by opening the filter settings and saving the filter (no need to change anything) and all tasks should reappear.

Please check with the next unstable build (should be ready for deployment in ~45min, also on try).

Edit: After thinking about it, that will not work for date filters because they are never updated. Will look into a fix.

Now we’re accounting for time changes as well: bc52da4029.

Please check with the next unstable build (should be ready for deployment in ~45min, also on try).

@kolaente
I don’t think this was fixed properly back in the day.

For me Kanban Saved Filter in Typesense instance always showed 9/10/11 tasks in a bucket which kind of seemed random. First I saw the new task matching the condition appear in a bucket, then after a minute it was gone. Crazy…
I think I tracked down culprit of these ghost tasks finally…

Vikunja runs a scheduled cron job every minute to re-evaluate tasks. Specifically, it iterates through every saved filter, queries Typesense, and retrieves tasks that match the filter conditions.

The issue was that the query used a per-page limit of -1, which was incorrectly handled at a lower level. Before sending the request to Typesense, the per-page parameter remained unset. Since Typesense, by default, returns only 10 tasks when per_page is not explicitly set, this caused unintended filtering.

Solution

To fix this, we need to ensure that before the query is sent to Typesense, the per-page parameter is explicitly set to 250, which is the maximum value Typesense supports.

// task_search.go:640
if opts.perPage == -1 || opts.perPage > 250 {
	if opts.perPage > 250 {
		log.Warningf("Typesense only supports up to 250 results per page, requested %d.", opts.perPage)
	}
	opts.perPage = 250
}
if opts.perPage > 0 {
	params.PerPage = pointer.Int(opts.perPage)
}

Sorry don’t have time to deal with PR at the moment. Fortunately I have task for PR in my saved filter’s bucket though! And I hope to get back to it sooner or later.

Hey that’s a great analysis! I’d love a PR for this at some point, even if you don’t have the time right now.

Thank you guys for looking into this! I appreciate the effort. My setup also uses typesense, and disabling it for now as a workaround seems to be working. I will enable it back once there’s a fix.