Update tpactions.py

Compacting @done scan through subtasks into a single function.