No email notificaton when issues are in a new creation file in a git project

  • versions used
    SonarQube Community lts(7.9.4) docker version
  • steps to reproduce
  1. Setup the SMTP server and subscribe “My new issues”. Config the account with email.
  2. Create a new project, commit the project by git, and perform an init scan.
  3. Add a new file containing issues, commit by git again, and perform a new scan.
  4. 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.


Welcome to the community!

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.


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.

This makes developers confused a lot.

@ganncamp Any suggestion?


To be honest, I’m confused here.

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?