server icon indicating copy to clipboard operation
server copied to clipboard

[BUG]: Deleting subtasks in Supertasks

Open gpascal123 opened this issue 3 months ago • 7 comments

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.

gpascal123 avatar Oct 22 '25 13:10 gpascal123

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

jessevz avatar Oct 22 '25 13:10 jessevz

I mean that the entries from the SupertaskPretask table are not being removed.

Currently, Tasks-Delete is being called.

gpascal123 avatar Oct 22 '25 13:10 gpascal123

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)

s3inlc avatar Oct 22 '25 13:10 s3inlc

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

jessevz avatar Oct 22 '25 14:10 jessevz

This concerns deleting a subtask of a supertask, as shown in this screenshot.

Image

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?

gpascal123 avatar Oct 23 '25 06:10 gpascal123

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.

s3inlc avatar Oct 23 '25 06:10 s3inlc

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.

cv5ch avatar Oct 27 '25 10:10 cv5ch