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

New code period is badly set when there's only one version

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8.1
    • Component/s: Compute Engine
    • Labels:
      None
    • Edition:
      Community
    • Production Notes:
      None

      Description

      Step to reproduce

      1. Analyze a project for the first time on a given version V1 at least two times
      2. Analyze this project using the next version V2

      => In the project Overview, the new code is defined as "since <Date of first analysis>", instead of "since version V1"
      => In the project Activity, the new code period is defined on the first analysis of version V1, instead of the last analysis

      Technical consideration

      This issue is coming fromĀ https://github.com/SonarSource/sonar-enterprise/blob/master/server/sonar-ce-task-projectanalysis/src/main/java/org/sonar/ce/task/projectanalysis/period/NewCodePeriodResolver.java#L97.

      As long as there's only one version in previous analysis, it will be always the first analysis that will be set as the new code period, even when current analysis is a new version.

        Attachments

          Activity

            People

            Assignee:
            duarte.meneses Duarte Meneses
            Reporter:
            julien.lancelot Julien Lancelot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: