Apis for **new code** metrics at portfolio level

It would be interesting and very useful to have web-apis to fetch metrics for new code at portfolio level, similar to the way it is available at project level now.

For now APIs like https://mysonar/api/measures/component?component=myportfolio&metricKeys=new_<> works only at project level and returns empty string for portfolio.

Hi @blrcoc,

The measures on new code are not available on Portfolios. Indeed, the New Code period is different on each project, and at Portfolio level it would not make any sense to “simply” do the sum of the new code value on each project.

Do you have a specific idea in mind that would change what I’ve just described ?

Thanks

If the New Code period is configured using definite timeline (since specific_date, since last n days etc) results can be aggregated for the code changes in this period.

If the application team is publishing multiple dashboards - one for each module or - one for their client code, server etc or - one for each team working for larger application it makes sense to aggregate these results using portfolio and that is what we are doing in our organization.
For any given application we have portfolio defined & extract metrics not at project level but at portfolio level. With this option to aggregate metrics for new code based on fixed date would be helpful.

If the projects of your portofolio follow the same lifecycle, then maybe you should use the Application feature instead of the Portfolio ?
Applications allow you to group projects together, and at the same time they behave completely as Projects.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.