Duplicate labels with the same name get created (after CalDav sync?)

So this is a weird one, that is pretty anoying to me.

The problem is that I sometimes get duplicate labels for the labels that I have actually in use.
I can see them in the labels section in the sidebar. They mess up my filters and fill up my label list. One thing I realized is that they get created with color Black. My other ones are getting created with Color White. I only see the difference between them in Darkmode.

I’m a little unsure why I have them, tho.

There could be the case, that it is because of the CalDav integration with Tasks.org on my phone. So I create task 1 with label next on the server, it syncs to the phone. No on the next sync it thinks task 1 has a new label next and creates a new one on the server.

I actually did a test. I have no open tasks with label planning on the server. So I created one in Tasks.org and used the planning label there. As soon as it synched with the server, a new planning label got created. It did not reuse the existing one.


The solution to this depends on the CalDav integration. How are labels treated there? If it is just a string that is connected to the task, we should always check, if we have this string as a label already on the server. If so, use this one.
If the labels are treated as seperate entities in CalDav (probably with own ID), then it get’s trickier. We might want to dig deeper than.

I use the hosted Vikunja option. Browser is Firefox.
You can contact me if you want to see the logs, I can give you my login address.

This is actually the first major Vikunja Bug that I encounter, that really messes up my workflow…

This is already fixed in latest: #1435 - Multiple labels with same title (importing via CalDav) - api - Gitea

While still using the stable version, as a workaround I set colors to the ‘real’ labels and remove the non-colored ones. But still this is messy.

2 Likes

Thank you so much. I’m happy it is fixed.

I hope it gets pushed soon.

1 Like