We're re-organizing workflow in our team and one of the key decisions was to use Scrum process, provided with help of Jira and Greenhopper.
I've read various Scrum guides, documentation of Greenhopper and started Scrum process implementation in our team. After some corrections and changes it mostly good, but one thing doesn't let me sleep well: bugs.
Different solutions are proposed by developers, but I still can't find my way here.
In our workflow any issue lives in 4 states: Open -> In Testing -> Resolved -> Closed
When developer is satisfied with his code he puts issue to In Testing state, and it becomes automatically assigned to QA lead. QA verifies the issue and, if everything is ok issue becomes Resolved. If not - Open again. In Resolved state code review is performed, and if code is secure, optimal and fits the developed structure, issue becomes Closed. If developer did something wrong - Open again.
The tricky part here is re-opening of an issue (story), because at same time bugs are raised, which land in product backlog - not sprint backlog, and due to Scrum-way developer can't work on issues, that are not in sprint backlog, but at same time story can't be closed, because code is buggy or written bad.
So, the question is: should a story be closed, even if it has some bugs, related to it, and these bugs are planned to be fixed in further sprints?
Or story can't be closed, until all related bugs are fixed, meaning that if a sprint is finished, but not all bugs are fixed for a story, story remains opened, excluded from finished sprint and moved to a next sprint, so it's story points are not burned in finished sprint?