Wrong description in the sqale_index metric

Hi.

I think I found a bug in the description of the “Technical Debt” metric returned by the web API.

Accessing https://next.sonarqube.com/sonarqube/api/metrics/search?p=2 we get this:

    {
      "id": "113",
      "key": "sqale_index",
      "type": "WORK_DUR",
      "name": "Technical Debt",
      "description": "Total effort (in days) to fix all the issues on the component and therefore to comply to all the requirements.",
      "domain": "Maintainability",
      "direction": -1,
      "qualitative": true,
      "hidden": false,
      "custom": false
    },

Note that the description says that the value is measured in days. But it seems that api/measures/component returns a value in minutes, not in days:

https://next.sonarqube.com/sonarqube/api/measures/component?component=org.sonarsource.javascript%3Ajavascript&metricKeys=sqale_index

{
 "component": {
   "id": "5eab015a-1f76-4ba4-bd89-bf547132d673",
   "key": "org.sonarsource.javascript:javascript",
   "name": "SonarJS",
   "description": "SonarQube JavaScript Analyzer",
   "qualifier": "TRK",
   "measures": [
     {
       "metric": "sqale_index",
       "value": "3901",
       "bestValue": false
     }
   ]
 }
}

3901 minutes = ~65h = ~8 days (same as shown in https://next.sonarqube.com/sonarqube/dashboard?id=org.sonarsource.javascript%3Ajavascript)

Hi,

Thanks for your report. My understanding is that these descriptions aren’t actually used anywhere. Did you find this browsing the code, or did you see it reflected in the UI somewhere?

 
Ann

I found this when I was answering Sonar 7.6 rest api issue (I was trying to find what was the id of the “technical debt” metric). I don’t think it is shown in the UI.

To my knowledge it’s not displayed in the webapp. Nevertheless it’s trivial to fix: https://jira.sonarsource.com/browse/SONAR-11802

1 Like