History values for New_Coverage

Hi Team,

We are using Version 6.7.2 (build 37468) and trying to retrieve New_coverage values with history to analyze overall coverage and build coverage historically but new_coverage is coming only for the last instance as shown in the below

https://sonarqube.voya.net/api/measures/search_history?metrics=new_coverage&ps=1000&from=2019-01-01&to=2019-05-22&component=CF_RS_CONTRIBUTION_EDGE

{
“paging”: {
“pageIndex”: 1,
“pageSize”: 1000,
“total”: 18
},
“measures”: [
{
“metric”: “new_coverage”,
“history”: [
{
“date”: “2019-03-26T09:53:42-0400”
},
{
“date”: “2019-04-02T16:01:12-0400”
},
{
“date”: “2019-04-02T16:59:36-0400”
},
{
“date”: “2019-04-12T16:17:50-0400”
},
{
“date”: “2019-04-16T17:02:18-0400”
},
{
“date”: “2019-04-22T12:31:29-0400”
},
{
“date”: “2019-04-29T21:41:13-0400”
},
{
“date”: “2019-05-01T14:44:52-0400”
},
{
“date”: “2019-05-06T18:37:32-0400”
},
{
“date”: “2019-05-07T12:07:02-0400”
},
{
“date”: “2019-05-09T15:06:44-0400”
},
{
“date”: “2019-05-10T10:14:14-0400”
},
{
“date”: “2019-05-13T10:37:56-0400”
},
{
“date”: “2019-05-15T16:23:15-0400”
},
{
“date”: “2019-05-16T17:03:22-0400”
},
{
“date”: “2019-05-20T12:58:32-0400”
},
{
“date”: “2019-05-21T23:54:59-0400”
},
{
“date”: “2019-05-22T00:26:42-0400”,
“value”: “82.75862068965517”
}
]
}
]
}

Can someone help me how to retrieve new_coverage historically.

Thank you!

Hi,

Indeed, new_XXX measures have no history, there are only used to display the measure on new code.
If you want the history of the coverage measures, you should use “coverage”.

Regards,
Julien Lancelot

thank you Julien,

the only reason we are looking for this values is

-Coverage: Will provide values for the entire Component
-New_Coverage: Will provide coverage on new code (New code may consist of new lines of code / modified lines of code)

We would like to see how much coverage is done on new lines of code also would like to know if any existing code is modified, if yes what is the coverage.

For all these we would like to store coverage historically.

Hope i explained correctly.

Thank you
Giri

then I do confirm that there are no history on the coverage on new code measures.