I don't think taskwarrior can create those reports by itself, but you could use timewarrior to do that.
After you set up timewarrior, the time spent on each task will be tracked.
Example:
➜ ~ task add reply on stack overflow
Created task 341.
➜ ~ task start 341
Starting task 81b73133 'reply on stack overflow'.
Started 1 task.
Tracking "reply on stack overflow"
Started 2020-04-10T12:07:58
Current 59
Total 0:00:01
➜ ~ task 341 done
Completed task 81b73133 'reply on stack overflow'.
Completed 1 task.
Recorded "reply on stack overflow"
Started 2020-04-10T12:07:58
Ended 09:12
Total 0:01:14
By default you will see how much time you spent on the task. In case you start and stop the task multiple times or want to see the time you spent on a project or on tasks with a certain tag, you can query timewarrior directly:
➜ ~ timew summary 'reply on stack overflow'
Wk Date Day Tags Start End Time Total
W15 2020-04-10 Fri reply on stack overflow 12:07:58 12:09:12 0:01:14 0:01:14
0:01:14
This shows you the time you spent today on that task. You can also specify a time interval in case you want to see the total time spent on the task/project/tag.
Example:
➜ ~ timew summary 2020-01-01 - tomorrow 'reply on stack overflow'
Wk Date Day Tags Start End Time Total
W15 2020-04-10 Fri reply on stack overflow 12:07:58 12:09:12 0:01:14 0:01:14
0:01:14
To see how much time you spent on project test
you can just run:
timew summary 2018-01-01 - tomorrow test
This will also include the tasks named 'test' and tasks with the tag test
.