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

Update the Technical Debt analysis models when upgrading some language plugins

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3
    • Component/s: Database, Rules
    • Labels:
      None

      Description

      Currently, those technical debt analysis models are never updated.

      From a technical point of view:

      The structure of the 'rules' table should be updated to add those four new columns :

      • default_subcharacteristic_id
      • default_remediation_function
      • default_remediation_coefficient
      • default_remediation_offset

      And those four new columns should be kept in sync with analysis models embedded into each language plugin.

      Moreover when using the SonarSource SQALE plugin, it should be possible to override those default values. So the following four additional columns should also be added:

      • subcharacteristic_id
      • remediation_function
      • remediation_coefficient
      • remediation_offset

      When reseting the Quality Model and the Analysis Models:

      • Those four previous columns should be set to null
      • characteristics table should be updated
      • Four default_* fields should be updated accordingly

      When restoring a Quality/Analysis models from an XML file

      • characteristics table should be updated
      • default_subcharacteristic_id should be updated accordingly :
        • Either the sub-characteristic provided out-of-the-box exists in the new Quality Model, and default_subcharacteristic_id should be linked to this subcharacteristic
        • Or the sub-characteristic provided out-of-the-box doesn't in the new Quality Model, and the default_subcharacteristic_id should be set to null
      • subcharacteristic_id should be updated accordingly :
        • Either default_subcharacteristic_id = subcharacteristic_id and then subcharacteristic_id should be set to null
        • Or default_subcharacteristic_id != subcharacteristic_id and subcharacteristic_id overrides the default subcharacteristic
      • Same thing for remediation_function, remediation_coefficient and remediation_offset

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              julien.lancelot Julien Lancelot
              Reporter:
              fabemn OLD - Fabrice Bellingard
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: