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

Quality profile date is not updated when it has a child profile

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.5
    • Component/s: Quality Profile, Web API
    • Labels:
      None
    • Edition:
      Community
    • Production Notes:
      None

      Description

      How to reproduce

      1. Create a quality profile A
      2. Create another quality profile B and set A as parent
      3. Activate a rule in quality profile A

      => Update date of quality profile B will be updated, but not the update date of quality profile A.

      Technical detail

      The functional update date of quality profile is stored in RULES_PROFILES#RULES_UPDATED_AT.
      This column is updated by org.sonar.server.qualityprofile.RuleActivator#activate, which will have the responsibility to activate rule on every descendant of the quality profile.

      The column of the current quality profile is not updated because when reaching org.sonar.server.qualityprofile.RuleActivator#updateProfileDates(DbSession, RuleActivationContext) to update the quality profile, RuleActivationContext#getProfile is set to child quality profile and not to current quality profile.

      It seems that the RuleActivationContext#currentProfile is not updated when reaching the quality profile on which a rule was activated.

        Attachments

          Activity

            People

            • Assignee:
              benoit.gianinetti Benoit Gianinetti (Inactive)
              Reporter:
              julien.lancelot Julien Lancelot
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: