versions used (SonarQube 7.9.1, Scanner sonar-scanner-4.0.0.1744)
steps to reproduce
Introduce a CODE_SMELL issue from user ex: john_doe. (This block of commented-out lines of code should be removed)
Run scanner, issue is reflected as OPEN in SonarQube project and author is john_doe.
Fix issue
Run scanner, issue is reflected as CLOSED in SonarQube project
Introduce same CODE_SMELL in the same line from another user ex: bill_smith
Run scanner, issue is reflected as OPEN in SonarQube project and author is john_doe. However, when the issue is clicked, the line with issue is annotated with bill_smith
In step 6, shouldn’t the issue author be bill_smith and status REOPENED? #bug:fp
First, we’ve quietly stopped populating REOPENED status without ever following through on the intent to clean up statuses and resolutions. (What a mess!) I haven’t given up hope on that. But that’s why you’re not seeing this in Reopened.
You’re seeing this assigned to the wrong dev as a side effect of a feature we implemented a while ago to keep the New Code Period clean. In the scenario that a configuration mistake runs an analysis that closes all (or some subset) of the issues, the previous behavior was that fixing that mistake and re-analyzing would have put all the issues in the new code period. Obviously this was BAD. So now if there’s a matching closed issue, we (re)open it rather than creating a “new” issue.
We’re aware of tension here. I’ve added this thread to the internal report. With your report, the count is up to 2 now, so I don’t expect to see action on this any time soon. We really consider it a corner case right now.