What Does the 'Map Subtasks to Parent Issues' Option Do?
The Map subtasks to parent issues option in your Project Management (PM) integration settings changes which issue a commit is counted under. Its main effect is on the Delivery views, such as Development Time.
How it works
CodeScene links commits to issues through the issue ID in the commit message, or through the branch or pull request (see What Does the 'Map Commit to Pull Requests Issues' Option Do?).
With the option switched on, each commit is counted under the parent of the issue it references instead of the issue itself:
The mapping goes up one level only. It does not keep climbing the hierarchy.
It ignores issue type. Any issue that has a parent is mapped to that parent, whether the parent is a Story, an Epic or something else.
It happens as soon as CodeScene reads the issue IDs from your commits. From then on the commit belongs to the parent, and the originally referenced issue won't appear in the results.
Example
Take a Jira hierarchy of Epic → Story → Sub-task, with the option on:
Why do I see Stories and Epics mixed together?
This happens when commits reference issues at different levels. Commits that reference Sub-tasks show up as Stories, and commits that reference Stories show up as Epics. So Development Time can list mostly Stories plus a few Epics, and the Stories under those Epics won't appear on their own.
Should I switch it on?
There's no option to map only Sub-tasks to Stories. Choose based on how your team references issues:
Switch it on if your commits and branches reference Sub-tasks and you want the work grouped under Stories. The results only stay consistent if everyone references the same level.
Leave it off (the default) to show every issue exactly as referenced, Sub-tasks included. This is usually the better choice when teams reference a mix of Stories and Sub-tasks.
After changing the option, run a new analysis to update the results.
Good to know
An issue only appears in Delivery if at least one commit is linked to it, either directly or through the mapping.
Related articles: What is Considered Unplanned Work? · How to Change the Ticket ID Mapping?