As part of a sprint, the team works on creating a new functionality.
During QA of this functionality, we detect a bug (dev, stage). I want to link this bug to a specific story within which the functionality was created.
The purpose of such a connection is to verify how many times the same improvement is fixed by different teams. To sum up, I would like to compare the story original estimate with the time that was spent on fixing bugs for this story.
I use the Tempo add-on to measure time. I also use issue type bug primarily to handle tickets on production versions where the environment, version, etc. are specified.
Of course, I also use the "linked issues" option.
What are the best practices in such a case?
Should I create a new subtask type, for example, called "bug-dev" and filter all such events by the issue type? As a result, each bug will be a subtask to a story in a new category.