It's necessary to select Epic issues in Sum Subtasks report (or dashboard item)
Add-on configuration is accessible from the report by Administrators only. See Configure link in header part of the report page.
Note, this behaviour is different than in Timesheet Reports and Gadgets add-on for Jira Server.
Here is example of report grouped by Worked User, and all hours summed into epic:
Please note, parent may be calculated up to 3 or even 4 levels, parent of a sub-task, Epic of a Story, if Parent Issue Field is configured in add-on configuration, Linked Issue, if Composition Issue LInk is configured in add-on configuration, and finally Jira Portfolio issue type, if Parent Issue Type configured in add-on configuration.
Additionally, it is possible to include only issues from active Sprint, with JQL like "sprint in openSprints()" + "or parentSprint in openSprint()" if Sum SubTasks.
Note, it may be convenient to use Filter with JQL like "parentEpic in (issueKey,...)" in case you'd like to have report for certain epic(s).
Didn't help? Find different article: