]> source.dussan.org Git - sonarqube.git/commit
SONAR-9887 Reuse information from issues in short living branches targeting current...
authorDuarte Meneses <duarte.meneses@sonarsource.com>
Wed, 4 Oct 2017 10:13:07 +0000 (12:13 +0200)
committerGitHub <noreply@github.com>
Wed, 4 Oct 2017 10:13:07 +0000 (12:13 +0200)
commitb8a42fed352a0349caf85393b2e4c60ceb647e72
tree6664d605e88669d2f835e33650ddda9798cfdca5
parenta816f8904d4a9474308845537a85ff64f71156b7
SONAR-9887 Reuse information from issues in short living branches targeting current branch

* Add ShortBranchComponentsWithIssues

* Load only required component fields from dto

* Keep only uuid and branch from analysisMetadataHolder

* No need for branch in ShortBranchComponentsWithIssues

* Add IssueDao.selectResolvedOrConfirmedByComponentUuid

* Add ResolvedShortBranchIssuesFactory

* Add components to ProjectAnalysisTaskContainerPopulator

* issue info from short branches

* Do not open db session for nothing

* Get issues for all uuids at once

* Select only fields required for issue tracking

* Improvements

* Add ShortBranchIssue with only the fields needed for issue tracking

* fix test

* Add missed license

* minor improvements

* Fix IssueStatusCopierTest and move ShortBranchIssue class

* Clean up ShortBranchIssueDto and its query

* Fix mapping of dto class

* Verify that required fields are correctly mapped

* fixes

* Fix issues loader

* Do not use "key" as field name in db operations

* Should find issues to merge only in short branches

* Strip branch from component key
31 files changed:
server/sonar-db-dao/src/main/java/org/sonar/core/issue/ShortBranchIssue.java [new file with mode: 0644]
server/sonar-db-dao/src/main/java/org/sonar/db/MyBatis.java
server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentDao.java
server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentDto.java
server/sonar-db-dao/src/main/java/org/sonar/db/component/ComponentMapper.java
server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDao.java
server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueMapper.java
server/sonar-db-dao/src/main/java/org/sonar/db/issue/ShortBranchIssueDto.java [new file with mode: 0644]
server/sonar-db-dao/src/main/resources/org/sonar/db/component/ComponentMapper.xml
server/sonar-db-dao/src/main/resources/org/sonar/db/issue/IssueMapper.xml
server/sonar-db-dao/src/test/java/org/sonar/db/issue/IssueDaoTest.java
server/sonar-server/src/main/java/org/sonar/server/computation/task/projectanalysis/analysis/AnalysisMetadataHolder.java
server/sonar-server/src/main/java/org/sonar/server/computation/task/projectanalysis/analysis/AnalysisMetadataHolderImpl.java
server/sonar-server/src/main/java/org/sonar/server/computation/task/projectanalysis/component/MergeBranchComponentUuids.java
server/sonar-server/src/main/java/org/sonar/server/computation/task/projectanalysis/component/ShortBranchComponentsWithIssues.java [new file with mode: 0644]
server/sonar-server/src/main/java/org/sonar/server/computation/task/projectanalysis/container/ProjectAnalysisTaskContainerPopulator.java
server/sonar-server/src/main/java/org/sonar/server/computation/task/projectanalysis/issue/IntegrateIssuesVisitor.java
server/sonar-server/src/main/java/org/sonar/server/computation/task/projectanalysis/issue/IssueLifecycle.java
server/sonar-server/src/main/java/org/sonar/server/computation/task/projectanalysis/issue/IssueStatusCopier.java [new file with mode: 0644]
server/sonar-server/src/main/java/org/sonar/server/computation/task/projectanalysis/issue/ResolvedShortBranchIssuesLoader.java [new file with mode: 0644]
server/sonar-server/src/main/java/org/sonar/server/computation/task/projectanalysis/scm/ScmInfoImpl.java
server/sonar-server/src/test/java/org/sonar/server/computation/task/projectanalysis/analysis/AnalysisMetadataHolderRule.java
server/sonar-server/src/test/java/org/sonar/server/computation/task/projectanalysis/analysis/MutableAnalysisMetadataHolderRule.java
server/sonar-server/src/test/java/org/sonar/server/computation/task/projectanalysis/component/ShortBranchComponentsWithIssuesTest.java [new file with mode: 0644]
server/sonar-server/src/test/java/org/sonar/server/computation/task/projectanalysis/issue/IntegrateIssuesVisitorTest.java
server/sonar-server/src/test/java/org/sonar/server/computation/task/projectanalysis/issue/IssueLifecycleTest.java
server/sonar-server/src/test/java/org/sonar/server/computation/task/projectanalysis/issue/IssueStatusCopierTest.java [new file with mode: 0644]
sonar-core/src/main/java/org/sonar/core/issue/tracking/AbstractTracker.java [new file with mode: 0644]
sonar-core/src/main/java/org/sonar/core/issue/tracking/SimpleTracker.java [new file with mode: 0644]
sonar-core/src/main/java/org/sonar/core/issue/tracking/Tracker.java
sonar-core/src/main/java/org/sonar/core/issue/tracking/Tracking.java