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

Differential measure wrongly computed for new issues on rules

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.6
    • Fix Version/s: 3.7
    • Component/s: Issues
    • Labels:
      None

      Description

      The PastSnapshot class truncates the "targetDate" to the seconds (= it removes milliseconds).
      But the CountUnresolvedIssuesDecorator uses "targetDate" to compare with the creation date of issues, in method #isAfter().
      The problem is that because of this, issues introduced in the previous snapshot have a "creationDate" that is effectively after the snapshot truncated date - whereas they should have strictly the same date and therefore should not be counted.

      The solution is to compare "issue.creationDate()" and "date" (= targetDate) with the same precision (second).

        Attachments

          Activity

            People

            Assignee:
            simon.brandhof Simon Brandhof (Inactive)
            Reporter:
            fabemn OLD - Fabrice Bellingard
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: