Vikunja API - Marking as done removes repeat attribute

I’ve noticed that POST’ing {"done": true} to /api/v1/tasks/INT marks a task as done, but also removes the “repeat” attribute if it has one. Is there a way around that without having to post the whole task-object? It works as intended for normal tasks that don’t repeat.

Right now there’s no way around this. The problem here comes from nil values in Go. For example, the nil value of a boolean is false. In the api I can’t differentiate between “this value was not set” and “this value was explicitly set to false”. One idea might be to additionally pass in the fields which should be updated, but that will get complicated quite quickly.

Open for ideas.

I see. I was afraid of that. Personally I would consider it more appropriate to include all the fields you want to update and leave the others unchanged. That would yield more precise/expected results in my opinion. While it may increase complexity in Vikunja, it would make life a lot easier for everyone using the API :slight_smile:

That’s exactly what won’t work due to Go’s nil values.

I see, unfortunately I have no knowledge of Go yet, only .NET and Python :slight_smile: