Background: I'm asking this question as a UI test engineer. We have a small software team using TFVC on a TFS repository. We use the mantis bug tracking system to follow up on issues.
Here's the situation: While manually testing a program, I found a bug and reported it to the devs. A few days later, a dev has let me know the issue was resolved. Some other day, I started testing to see if the bug was resolved but found the exact same bug.
problem: Someone made a change in the code in order to fix the bug. A few days later, the code got changed again, reintroducing the bug into the program. I don't know if this occurred because of the auto-merge feature in TFVC or that the change was made by another programmer who did not know about that fix.
question: Are there ways to prevent such errors from ever happening? Or is this just sloppy work from that dev who changed the code back to its original form?