From 2641578935496d001cb243a6e7f588622e5d1484 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gr=C3=A9goire=20Aubert?= Date: Fri, 30 Jun 2017 17:27:18 +0200 Subject: [PATCH] SONAR-8550 Fix a regression that prevent from creating new versions on project activity page --- .../components/ProjectActivityAnalysesList.js | 1 - .../projectActivity/components/ProjectActivityAnalysis.js | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysesList.js b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysesList.js index 368ecf5abe9..9644ad770e1 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysesList.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysesList.js @@ -142,7 +142,6 @@ export default class ProjectActivityAnalysesList extends React.PureComponent { deleteEvent={this.props.deleteEvent} isFirst={analysis.key === firstAnalysisKey} key={analysis.key} - version={version.version} /> ))} diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysis.js b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysis.js index 5fbdb2bdf41..1cd17b22bb9 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysis.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysis.js @@ -34,14 +34,14 @@ type Props = { changeEvent: (event: string, name: string) => Promise<*>, deleteAnalysis: (analysis: string) => Promise<*>, deleteEvent: (analysis: string, event: string) => Promise<*>, - isFirst: boolean, - version: ?string + isFirst: boolean }; export default function ProjectActivityAnalysis(props: Props) { const { date, events } = props.analysis; const { isFirst, canAdmin } = props; const analysisTitle = translate('project_activity.analysis'); + const hasVersion = events.find(event => event.category === 'VERSION') != null; return (
  • @@ -63,7 +63,7 @@ export default function ProjectActivityAnalysis(props: Props) {
      - {props.version == null && + {!hasVersion &&