-1

We coded something which works but is quite terrible. We have planned the refactoring of that piece of code in this sprint but since it doesn't really fit in a user story, how do we add or represent this? Nothing will change at front-end, just back-end.

  • Why do you think you need to represent it specially? The Sprint Backlog is the team's to manage, and refactoring should be part of any properly-planned agile estimate. – Todd A. Jacobs Oct 20 '18 at 21:43
  • It's more that I don't really know where to put it. Do I move the User Story back to In Progress and add it as a task or do I put it somewhere else? That part of the code is of two sprints ago. – Sander Koldenhof Oct 20 '18 at 21:59
  • 1
    Forget the old story: it’s new work. The task belongs to whatever current story requires the refactoring, or its own story if refactoring is the deliverable. – Todd A. Jacobs Oct 21 '18 at 0:18
1

You have several options, including:

  • Add a task to the backlog that covers this (perhaps labelling it as technical debt)
  • Add a technical sub-task to a story that is already in your backlog

In the second option, what you are saying is

To complete this story and deliver a quality product to our team's definition of done we should include refactoring this piece of code

As an example, I worked with a team that wanted to replace a JavaScript library with a better version. They added the refactoring work as technical sub-tasks on a number of stories, each of which touched on different pages on a website. Once all of the stories had been completed they had also completed the library upgrade.

What I like about this approach is that it demonstrates that code quality is built-in to your delivery of functionality.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.