[BUG]: Deleting subtasks in Supertasks
Version Information
rainbow
Hashcat
No response
Description
As far as I could discover, deleting subtasks in Supertasks does not remove all links from the database.
What request did you perform and what exactly wasnt removed what you expected to be removed?
You should send a delete request to delete SupertaskPretask relation and then a delete request to the task
I mean that the entries from the SupertaskPretask table are not being removed.
Currently, Tasks-Delete is being called.
We have to use a different wording here.
Do we speak about a running supertask and a subtask of this to delete? (in this case, the delete should just make a DEL call to /task with the taskId.
or
Do we speak about a supertask configuration with preconfigured tasks belonging to it? (in this case, the delete would be to DEL only the relation of the preconfigured task to the supertask, and if it is a isMaskImported equals to 1 on the preconfigured task, then also the preconfigured task should be deleted)
to delete from the supertaskpretask table it should be possible to send a delete to: /api/v2/ui/supertasks/{id}/relationships/pretasks" with a resource record of the pretask in the body of the request
This concerns deleting a subtask of a supertask, as shown in this screenshot.
Currently, a DEL is simply called.
The assignment of the task to the supertask must be stored somewhere in the database.
Is this reference also deleted with the DEL?
In this case we speak about a running supertask (which in the DB is just a TaskWrapper). So there is only a DEL to the task itself required, there is no other relation which needs to be adjusted. A running supertask is just a taskwrapper which can have more than one tasks associated, but they are just normal tasks having the associated taskWrapperId saved.
You are right @s3inlc this gets always confused because both are called supertasks in the UI and often in the code, too. The supertasks in the task table are taskwrappers having tasks DB-wise and the supertasks in the supertask table are supertasks having pretasks DB-wise.