diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2018-08-14 18:07:10 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2018-08-21 20:21:05 +0200 |
commit | 3065f6824c72d504c8e317c7d2d6a2c682081c4f (patch) | |
tree | aa9a369907d4c31f3225e81f6073de77ba887d9e /server/sonar-db-dao/src/main/java/org/sonar/db | |
parent | 61c813392f60ec29e4b628e7244593c627058b5b (diff) | |
download | sonarqube-3065f6824c72d504c8e317c7d2d6a2c682081c4f.tar.gz sonarqube-3065f6824c72d504c8e317c7d2d6a2c682081c4f.zip |
SONAR-8368 reopen closed issues (restore status)
but those from Hotspots rules and manual vulnerabilities
Diffstat (limited to 'server/sonar-db-dao/src/main/java/org/sonar/db')
-rw-r--r-- | server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDto.java | 7 | ||||
-rw-r--r-- | server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueMapper.java | 4 |
2 files changed, 10 insertions, 1 deletions
diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDto.java b/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDto.java index df8b2f9fb07..252431d5a26 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDto.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueDto.java @@ -28,6 +28,7 @@ import com.google.protobuf.InvalidProtocolBufferException; import java.io.Serializable; import java.util.Collection; import java.util.Date; +import java.util.Optional; import java.util.Set; import javax.annotation.CheckForNull; import javax.annotation.Nullable; @@ -97,6 +98,8 @@ public final class IssueDto implements Serializable { private String filePath; private String tags; private boolean isFromHotspot; + // populate only when retrieving closed issue for issue tracking + private String lineChangeData; /** * On batch side, component keys and uuid are useless @@ -698,6 +701,10 @@ public final class IssueDto implements Serializable { return this; } + public Optional<String> getLineChangeData() { + return Optional.ofNullable(lineChangeData); + } + @Override public String toString() { return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE); diff --git a/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueMapper.java b/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueMapper.java index 0f80126c88c..9098c986d15 100644 --- a/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueMapper.java +++ b/server/sonar-db-dao/src/main/java/org/sonar/db/issue/IssueMapper.java @@ -43,7 +43,9 @@ public interface IssueMapper { int updateIfBeforeSelectedDate(IssueDto issue); void scrollNonClosedByComponentUuid(@Param("componentUuid") String componentUuid, ResultHandler<IssueDto> handler); - + + void scrollClosedByComponentUuid(@Param("componentUuid") String componentUuid, ResultHandler<IssueDto> handler); + List<IssueDto> selectNonClosedByComponentUuidExcludingExternals(@Param("componentUuid") String componentUuid); List<IssueDto> selectNonClosedByModuleOrProject(@Param("projectUuid") String projectUuid, @Param("likeModuleUuidPath") String likeModuleUuidPath); |