]> source.dussan.org Git - sonarqube.git/commitdiff
SONARCLOUD-290 Drop unnecessary request to api/organizations/search in issues page
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>
Fri, 11 Jan 2019 09:49:03 +0000 (10:49 +0100)
committersonartech <sonartech@sonarsource.com>
Wed, 16 Jan 2019 08:43:12 +0000 (09:43 +0100)
server/sonar-web/src/main/js/apps/explore/ExploreIssues.tsx
server/sonar-web/src/main/js/apps/issues/components/App.tsx

index 0457ad37bb59a1b52881cee468ae37917d427cac..1ac4f83c010384b44f06f9f2cd17013ba0b34a1f 100644 (file)
@@ -26,5 +26,7 @@ interface Props {
 }
 
 export default function ExploreIssues(props: Props) {
-  return <AppContainer hideAuthorFacet={true} myIssues={false} {...props} />;
+  return (
+    <AppContainer hideAuthorFacet={true} multiOrganizations={true} myIssues={false} {...props} />
+  );
 }
index 1bf52ed354b6e25afab1467d00e5e184d6241291..5c6db560471b862679641ab2308a56a8a5cee552 100644 (file)
@@ -101,6 +101,7 @@ interface Props {
   fetchIssues: (query: RawQuery, requestOrganizations?: boolean) => Promise<FetchIssuesPromise>;
   hideAuthorFacet?: boolean;
   location: Pick<Location, 'pathname' | 'query'>;
+  multiOrganizations?: boolean;
   myIssues?: boolean;
   onBranchesChange: () => void;
   organization?: { key: string };
@@ -438,7 +439,10 @@ export class App extends React.PureComponent<Props, State> {
       Object.assign(parameters, { assignees: '__me__' });
     }
 
-    return this.props.fetchIssues(parameters, requestOrganizations);
+    return this.props.fetchIssues(
+      parameters,
+      Boolean(requestOrganizations && this.props.multiOrganizations)
+    );
   };
 
   fetchFirstIssues() {