diff options
-rw-r--r-- | server/sonar-web/src/main/coffee/component-viewer/main.coffee | 6 | ||||
-rw-r--r-- | server/sonar-web/src/main/coffee/component-viewer/mixins/main-issues.coffee | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/coffee/component-viewer/main.coffee b/server/sonar-web/src/main/coffee/component-viewer/main.coffee index 9f65306e531..15e2a13d138 100644 --- a/server/sonar-web/src/main/coffee/component-viewer/main.coffee +++ b/server/sonar-web/src/main/coffee/component-viewer/main.coffee @@ -185,9 +185,9 @@ define [ # Periods @periods.reset [{label: t('none')}] data.periods.forEach (p) => - d = new Date p[2] - d.setHours 0, 0, 0, 0 - p = @periods.add key: p[0], label: p[1], sinceDate: d + d = moment p[2] + date = new Date d.get('year'), d.get('month'), d.get('date') + p = @periods.add key: p[0], label: p[1], sinceDate: date requestMeasures: (key, period = null) -> diff --git a/server/sonar-web/src/main/coffee/component-viewer/mixins/main-issues.coffee b/server/sonar-web/src/main/coffee/component-viewer/mixins/main-issues.coffee index 477420b5d29..5c3d522595a 100644 --- a/server/sonar-web/src/main/coffee/component-viewer/mixins/main-issues.coffee +++ b/server/sonar-web/src/main/coffee/component-viewer/mixins/main-issues.coffee @@ -84,7 +84,8 @@ define [ if period p = predicate predicate = (issue) => - (new Date(issue.creationDate) >= period.get('sinceDate')) && p issue + creationDate = new Date moment(issue.creationDate).format() + (creationDate >= period.get('sinceDate')) && p issue if requestIssues && !@state.get 'hasIssues' @requestIssues(@key).done => @_filterByIssues(predicate) |