How do you log and manage defects (aka bugs) detected prior to releasing to production? Do you create a 'bug', create a task in the story, create a sub-task, use a custom issue type (e.g., defect), or something else? Do you use the same process for logging bugs found pre-prod as those that have leaked to prod? If so, do you need to differentiate between them with an environment field to manage them and collect metrics?
We want to be able to report on bugs, know what environment, root cause and other information. Right now we capture bugs leaked to production by creating a bug, but wwe have no custom fields, so are wondering if we should use this same issue type for bugs found prior to releasing to production or something different that better ties it to the story/sprint.
What are you doing / what do you suggest? Thanks for your help!