SonarQube collects a maximum of measures in an automated manner but there are some measures for which this is not possible, such as when: the information is not available for collection, the measure is computed by a human, and so on. Whatever the reason, SonarQube provides a service to inject those measures manually and allow you to benefit from other services (Dashboard, TimeMachine, etc.): the Manual Measures service. The manual measures entered will be picked during the next analysis of the project and thereafter treated as "normal" measures.
Managing Custom Metrics
As with measures that are collected automatically, manual measures are collected on metrics. Therefore, the first thing is to create the metric you want to save your measure against. In order to do so, log in as a system administrator and go to Administration > Configuration > Custom Metrics:
Managing Custom Measures
Custom measures can be entered at project level and module level. To add a measure, sign in as a project administrator, go to the dashboard of the desired component and choose Administration > Custom Measures. You are presented with a table containing the latest measure entered for each metric:
The orange marker means that no analysis has been run since the manual measure was entered, and therefore it will not appear on the component.
From there, you have the ability to edit or delete an existing measure or enter a new one:
Whatever action is taken on a custom measure will be picked by the next analysis of the component.
Displaying Custom Measures
In order to display Custom Measures on the dashboard, you can use the Custom Measures Widget.
Log in and go to one of your dashboard, click on Configure Widgets and choose the Custom Measures Widget:
You should then configure it to display the desired metrics:
And you get the new widget on the dashboard: