Every defects can be linked to User Story. This will create parent child relation between a User Story and attached defects. All the defects will become child of the User Story under which they are created.
To add a defect to story,
1. Go to the Defects tab in add/edit story.
2. Click on Add Defect button.
3. Fill the required information.
4. Click on Save button.