]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-8550 Fix a regression that prevent from creating new versions on project activi...
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>
Fri, 30 Jun 2017 15:27:18 +0000 (17:27 +0200)
committerGrégoire Aubert <gregoire.aubert@sonarsource.com>
Tue, 4 Jul 2017 12:15:34 +0000 (14:15 +0200)
server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysesList.js
server/sonar-web/src/main/js/apps/projectActivity/components/ProjectActivityAnalysis.js

index 368ecf5abe9bfaf1b565306529ed5a965f30976e..9644ad770e1f942920991ec14828ba5ba414ae71 100644 (file)
@@ -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}
                         />
                       ))}
                   </ul>
index 5fbdb2bdf411e39c42cf2eeb1c2992c5b569067b..1cd17b22bb9b6ed77f99c3ee3731fcfcc3603293 100644 (file)
@@ -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 (
     <li className="project-activity-analysis clearfix">
       <div className="project-activity-time spacer-right">
@@ -63,7 +63,7 @@ export default function ProjectActivityAnalysis(props: Props) {
               <i className="icon-dropdown" />
             </button>
             <ul className="dropdown-menu dropdown-menu-right">
-              {props.version == null &&
+              {!hasVersion &&
                 <li>
                   <AddEventForm
                     addEvent={props.addVersion}