diff options
author | Stas Vilchik <stas.vilchik@sonarsource.com> | 2017-10-20 16:13:47 +0200 |
---|---|---|
committer | Daniel Schwarz <bartfastiel@users.noreply.github.com> | 2017-10-24 17:40:56 +0200 |
commit | d1f8eb5bbc8f4779d23f23e43b1326e00e3c9131 (patch) | |
tree | 84af71346b83bc28e648293f0c2f00fcec6e1eab | |
parent | 0670c244e9e2d38a63263beaf11316708af6c6d3 (diff) | |
download | sonarqube-d1f8eb5bbc8f4779d23f23e43b1326e00e3c9131.tar.gz sonarqube-d1f8eb5bbc8f4779d23f23e43b1326e00e3c9131.zip |
SONAR-10008 update boundaries in creation date facet
-rw-r--r-- | server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.js b/server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.js index c897fb9ac49..2f4e5038b86 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.js +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/CreationDateFacet.js @@ -161,15 +161,14 @@ export default class CreationDateFacet extends React.PureComponent { } const { formatDate } = this.context.intl; - const beforeDate = createdBefore ? createdBefore : undefined; const data = periods.map((start, index) => { const startDate = parseDate(start); - let nextStartDate = index < periods.length - 1 ? periods[index + 1] : beforeDate; let endDate; - if (nextStartDate) { - nextStartDate = parseDate(nextStartDate); - endDate = parseDate(nextStartDate); + if (index < periods.length - 1) { + endDate = parseDate(periods[index + 1]); endDate.setDate(endDate.getDate() - 1); + } else { + endDate = createdBefore && parseDate(createdBefore); } let tooltip = @@ -182,7 +181,7 @@ export default class CreationDateFacet extends React.PureComponent { return { createdAfter: startDate, - createdBefore: nextStartDate, + createdBefore: endDate, tooltip, x: index, y: stats[start] |