labels are not assigned/created together with task
Openopened 9 months ago by k2s · 5 comments
Reference in New Issue
There is no content yet.
Delete Branch '%!s(<nil>)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
I created test script based on
Only 1 task will have label assigned. Correct would be if 3 would have label assigned.
labels are not assigned/created together whithto labels are not assigned/created together with task 9 months ago
Which one is assigned as expected, the last one?
For creating a task and passing the label along this is simply not implemented.
Changing the labels during updates is a bit more complicated: https://kolaente.dev/vikunja/api/src/branch/main/pkg/models/tasks.go#L1050-L1065
Now, it's been a while since I wrote that comment so it might be time to revisit the mechanism.
The last one works. I would expect that all 3 requests containing
It is not so important for user interaction, but it makes diferrence when mass importing.
Was not thinking about permission problem, but should we not simply:
task with new labelrequest is different problem, it requires to get or create label.
All this is only about bulk operation efficiency and not very critical.
It should be at least documented in https://try.vikunja.io/api/v1/docs#tag/task.
We actually do have the current user in the
Updatecontext so that we could implement adding labels while creating a task. As I said, it's been a while since I wrote that comment :)
As you outlined it is the way to go. I'd just like to check if there's an existing label and use that before creating a new one - or we could delegate that to the client and only check if there's an ID present in the label object and if that's the case check if the user can use that label and use it. If not, create and add it.
+1 for this should be documented.
Now, if we allow this for labels during creation, what about other related entities like assignees?
I think that makes sense.
Just a note, a user can only subscribe themselves to a task, it is not possible to subscribe other people to a task or list.