Sonar activity marking old issues as new


I think there is a problem with the activity history in SonarCloud.

One of our customers states that their developers try to fix any issues that arise in the new code. That is: new features or code retouching.

The thing is that they are having “new” issues, but not in the new code, but in old code. Let me explain:

If there is a rule change, you may detect issues in code that belong to the old code or overall code. If one of these issues is detected, the date of the issue is the date of the commit to which it belongs.

In this particular case, it is 5 years old. The associated rule was activated in December 2023. This is not a new issue. It is not in the new code.

Rule activation date:

However, in the activity graphs, zero issues appear up to the time of detection. From that moment on, the issues do appear and Sonar marks the issues as having risen (in this case, there are 7 due to rule changes).

This can lead to confusion (which is, in fact, what is happening to them). They interpret this graph as 7 NEW incidents. And they are not, they are issues that were already there and have been detected later.

The developers are getting worried because they are getting new issues and the managers are worried because it seems that the developers are not fixing the issues.

The most logical thing is that if the issue existed 1, 2 or 3 years ago, it appears in the history as if this issue existed.

I think that it is against the principles of Clean as you Code to mark as “newly created” issues introduced a long time ago.

Would it be possible to modify the history to reflect the issues I am talking about?


Thank you for the detailed feedback @mbastardo.excentia. I will look into this and get back to you.


Hello @mbastardo.excentia

I see here two different topics.

  1. “New” issues are raised in the old code

In fact, this is a valid behavior (check this thread for some explanations).
Indeed in many cases, SonarCloud will backdate issues to the date of source code (list of backdating cases).

If you believe that your issues should have been backdated and that it’s a bug on our side, let’s better understand your case.

  1. Activity graph display

The activity graph just shows the overall number of issues in the timeline. Even if issues are backdated (which is not your case), you will see a spike, as past ‘issues’ are not recomputed. I imagine that can be confusing, that’s a current limitation we have.


1 Like

Hi, Lena!

Sorry for the delay.

Yep, We have no issues whith the backdating, we see eye to eye that is the correct behaviour.

But we have some customers having troubles in understanding the Activity Graph Display. Some managers think those newly raised issues (but correctly backdated) are new issues introduced in the code. It’s at least confusing, as you said.

Would you be open to discuss if there is a need to modify this behaviour? Or, at least… maybe adding a new toggle to change newly raised or issues in new code?

Thank you,

Yeah, I understand the need to see that issues are fixed and the project’s quality is improving, and that activity graph is very confusing in this regard as it is today. We will discuss with the team what we can do about it.

Thanks for the feedback!

1 Like