Story #6282

Updated by bmbouter almost 2 years ago

A use case for pulp_ansible came up recently whereby tasks need to dispatch subtasks. It would be useful for them to see and filter on `parent_task` and `child_tasks` `child_task` fields in the Task model.

### Deliverables

1. `parent_task` and `child_task` fields added to the [Task model[(
2. Having these viewable on the [TaskSerializer](
3. Having them filterable on [TaskFilter](
4. Have the `enqueue_with_reservation` method automatically set the 'parent/child' relationship.

### Background

We used to have this, so we need to bring it back and add tests for it with this work. Here are some PRs to reference:

* This was what we had setting 'parent' but it's incomplete
* When we removed it from the serializers before: