versions used
SonarQube Community lts(7.9.4) docker version
steps to reproduce
Setup the SMTP server and subscribe “My new issues”. Config the account with email.
Create a new project, commit the project by git, and perform an init scan.
Add a new file containing issues, commit by git again, and perform a new scan.
No email notification but the new issues are showed in the project dashboard.
root cause
The project is managed by git, so all issues in new creation files are backdated. But the SendIssueNotificationsStep only sends the issues whose creation date is later than analysisDate.
I’m wondering if this logic is correct or not to check the issue creation date when sending notifications.
This is the intended functionality. The definition of “new” here is “raised within the New Code period,” and (most) backdated issues won’t match that criterion.
Thanks.
But I think the file is created in the “New Code period” in a general sense.
Suppose I develop a new feature containing both new files with other modifications. Commit, push to the remote branch, and trigger a sonar scan. I can receive issues of the modified file but no newly created file. But they are in a single commit.
Are we talking about PR analysis and decoration? If so, I think maybe emails aren’t sent for that; the assumption is that you’ll see it in your PR. If we’re not talking about PRs, then what dates are put on the issues? And are those dates within the New Code Period?