Someone has submitted a bug report to your repository. You fix the bug. You close the bug report. Stop. This is wrong. You shouldnât close it. Instead, you should ask the reporter to review your fix. Then, maybe, they will close the ticket. If they donât, you make another fix, until they do.
According to Joel Spolsky, âthe only person who can close a bug is the person who opened it in the first place.â But, why? Why shouldnât you close it, when itâs obvious that the bug is fixed? There are at least three reasons.
First, this is offensive and demotivating. Why do I report a bug or suggest a feature? Because Iâm not happy with your code in its current state. Something is broken or doesnât work as expected. I want you to fix it to make me happy. I want you to confirm with me whether your fix has made me happy. If you donât ask and simply close the ticket, I feel like Iâm being ignored. Why would I bother reporting another bug or feature request?
Second, this is a quality threat. Quality is always a product of conflict. The most productive conflict is the one between programmers and testers. Testers try to prove that the software is bad by submitting bug reports. Programmers try to prove that the software is good by covering it with tests. If you close without confirmation from the reporter, you donât give them a chance to argue with you. Of course, they may shrug their shoulders and reopen the ticket. However, not everybody will do this, trying to avoid being disrespectful or simply not having enough permission. In the end, no formal acceptanceâno quality.
Third, this leads to ticket duplication. Most bug reporters wonât argue when you close their tickets without asking their permission. Instead, they will open new tickets with exactly the same or a similar description. The most disciplined will refer to the original ticket. Others will fill up the backlog with duplicates, making it messy.
There are a few exceptions, though. If the ticket is an obvious duplicate, you close it right away. No need to ask its author for permission. If itâs a questionânot a bug reportâyou close it with an answer. Also, if you arenât planning to fix it, attach the won't fix badge to it and close.
P.S. I suggest avoiding automatic issue closing on pull request merge.
