From: Julien Lancelot Date: Mon, 28 Aug 2017 15:57:49 +0000 (+0200) Subject: SONAR-9616 Filter out branches in ComponentDao#selectProjects() X-Git-Tag: 6.6-RC1~380^2~34 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=96d5f10d52e6e72123c0ff13f44cef23d623b546;p=sonarqube.git SONAR-9616 Filter out branches in ComponentDao#selectProjects() --- diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentDao.java b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentDao.java index b6456c4e12d..5806296250b 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentDao.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentDao.java @@ -237,6 +237,8 @@ public class ComponentDao implements Dao { * Returns all projects (Scope {@link org.sonar.api.resources.Scopes#PROJECT} and qualifier * {@link org.sonar.api.resources.Qualifiers#PROJECT}) which are enabled. * + * Branches are not returned. + * * Used by Views. */ public List selectProjects(DbSession session) { diff --git a/server/sonar-db-dao/src/main/resources/org/sonar/db/component/ComponentMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/component/ComponentMapper.xml index c61e9363f90..6031646c260 100644 --- a/server/sonar-db-dao/src/main/resources/org/sonar/db/component/ComponentMapper.xml +++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/component/ComponentMapper.xml @@ -226,6 +226,7 @@ p.enabled=${_true} AND p.scope='PRJ' AND p.qualifier='TRK' + AND p.main_branch_project_uuid IS NULL