Issue in report of new code

Hi team,
I am using Sonarqube 8.4, Scanner 3.7.X
We are getting a report of overall code, but not getting new code report
Configuration in new code at project level given it as 250 days.
We are running jenkins job for report generation.
We are using GIT as source code repository.

Please let me know for any further details.

Hi,

Welcome to the community!

How about a screenshot?

 
Ann

Hi Ann,
I am attaching screenshot for the same
One with overall code check, and one more with new code check, in new code check only 1 code smell it is giving ie only xml related but there other java code smell as well, but sonar qube is not giving, we set 250 days for new code.
Please help us on this,
Regards,
Sheetal!
NewCodeCheck|690x461

Hi Sheetal,

What do you see if you click on the ‘New Code’ tab?

Also, you have run more than one analysis, right? If you’re expecting New Code to be populated with data from the last 250 days based on the SCM information in your first analysis… That would be really cool (and thanks for your confidence! :joy:) but that’s just not how it works.

Instead, your New Code values will be populated based on changes observed in analyses that happened over the last 250 days. Yes, SCM data is a factor in what’s considered “new”, but not the main determinant.

Have I correctly guessed your situation?

 
Ann

Hi Ann,
Thanks for you reply.

I have done analysis multiple times, then as well new code is not working, only one is issue appearing ie related to xml, but there are other code smell in java within last 250 days, as we already have another server where we installed 6.7 and there leak period is working fine.

Attaching screenshot for the same

Hi,

Would you mind showing your Activity page? Also, how long has this instance/database been running? Again, only issues created in analyses that took place in the last 250 days will show up as new here.

 
Ann

Hello,

Attaching activity page screenshot, also created database instance while creating this sonarqube ie 15days back.

Hello Ann,

Attached activity log in previous reply,
Also database instance running from last 15 days, and we have created this new Database instance for this sonar 8.4.

Hi,

Okay! Then it’s not possible for anything older than 15 days to show up as new code because that’s when you started analyzing. 185 days from now (your 200-day New Code Period - the 15 days you’ve been running so far) you’ll have a full, 200-day New Code Period.

 
HTH,
Ann

Thanks Ann, Got it.

One more issue
Can we set new code period in Date as we use to set in 6.7 as leak period?

Also We were using 6.7 sonarqube instance previously, there new code was working fine.
IN 6.7 we were using Mysql database, Now with 8.4 we are using postgress. Do we able to migrate the database of 6.7 mysql to 8.4 postgress?

Hi,

Unfortunately, that option was dropped

We provided a free migration tool.

 
HTH,
Ann

Thanks Ann.

One more question. If we migrate mysql DB of 6.7 to postgress. Can we get issues from 250 days in 8.4?

Regards,
Sheetal

Hi Sheetal,

I admire your persistence :joy:

You’ll get 250 days of issues / history when SonarQube has been running 250 days.

 
:woman_shrugging:
Ann