Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-10117

Update measures on relevant issue changes



    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.0
    • Component/s: Measures
    • Labels:


      Live-recalculation will be triggered by these webservices:

      • api/issues/bulk_change
      • api/issues/do_transition
      • api/issues/set_severity
      • api/issues/set_type

      The live-recalculation will do:

      1. Load issue statistics from the database (number of issues, grouped by issue type, resolution, severity, status, leak?), for the affected file, its directory, modules and project
      2. Load any live measure that will be needed; on the affected file, its directory, modules and project
      3. At first for the file, then directory, then the modules, last for the project
        1. Recalculate all measures that can be directly derived from the issue statistics
          domain key name
          Issues violations Issues
          Issues blocker_violations Blocker Issues
          Issues critical_violations Critical Issues
          Issues major_violations Major Issues
          Issues minor_violations Minor Issues
          Issues info_violations Info Issues
          Issues new_blocker_violations New Blocker Issues
          Issues new_critical_violations New Critical Issues
          Issues new_major_violations New Major Issues
          Issues new_minor_violations New Minor Issues
          Issues new_info_violations New Info Issues
          Issues new_violations New Issues
          Issues open_issues Open Issues
          Issues reopened_issues Reopened Issues
          Issues confirmed_issues Confirmed Issues
          Issues wont_fix_issues Won't Fix Issues
          Issues false_positive_issues False Positive Issues
          Maintainability code_smells Code Smells
          Maintainability new_code_smells New Code Smells
          Releasability alert_status Quality Gate Status
          Reliability bugs Bugs
          Reliability new_bugs New Bugs
          Security vulnerabilities Vulnerabilities
          Security new_vulnerabilities New Vulnerabilities

          (...and metrics generated by branches and governance plugins)

        2. According to a metric dependency graph, based on the just recalculated measures and some other measures, we recalculate:
          domain key name
          General quality_gate_details Quality Gate Details
          Maintainability effort_to_reach_maintainability_rating_a Effort to Reach Maintainability Rating A
          Maintainability new_maintainability_rating Maintainability Rating on New Code
          Maintainability new_sqale_debt_ratio Technical Debt Ratio on New Code
          Maintainability new_technical_debt Added Technical Debt
          Maintainability sqale_debt_ratio Technical Debt Ratio
          Maintainability sqale_index Technical Debt
          Maintainability sqale_rating Maintainability Rating
          Reliability new_reliability_rating Reliability Rating on New Code
          Reliability new_reliability_remediation_effort Reliability Remediation Effort on New Code
          Reliability reliability_rating Reliability Rating
          Reliability reliability_rating_effort Total number of projects having worst reliability rating
          Reliability reliability_remediation_effort Reliability Remediation Effort
          Security new_security_rating Security Rating on New Code
          Security new_security_remediation_effort Security Remediation Effort on New Code
          Security security_rating Security Rating
          Security security_rating_effort Total number of projects having worst security rating
          Security security_remediation_effort Security Remediation Effort
      4. All recalculated measures, that need to be updated, now get updated in the database

      When recalculating the variation of a measure, we will use this forumla:

      old_measure_value - old_variation := leak_start_value
      new_measure_value - leak_start_value := new_variation


          Issue Links



              simon.brandhof Simon Brandhof (Inactive)
              daniel.schwarz Daniel Schwarz (Inactive)
              0 Vote for this issue
              4 Start watching this issue