From 7e0281b0d3502036ad67a633e54a59627a5a925a Mon Sep 17 00:00:00 2001 From: Belen Pruvost Date: Thu, 16 Sep 2021 15:06:10 +0200 Subject: [PATCH] SONAR-15334 - Addressing validation feedback --- .../src/main/java/org/sonar/db/issue/IssueDto.java | 11 +++++++++++ .../resources/org/sonar/db/issue/IssueMapper.xml | 12 +++++++++--- 2 files changed, 20 insertions(+), 3 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 a949553a8c1..fb56835a0d9 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 @@ -69,6 +69,7 @@ public final class IssueDto implements Serializable { private String resolution; private String checksum; private String assigneeUuid; + private String assigneeLogin; private String authorLogin; private String issueAttributes; private String securityStandards; @@ -336,6 +337,16 @@ public final class IssueDto implements Serializable { return this; } + @CheckForNull + public String getAssigneeLogin() { + return assigneeLogin; + } + + public IssueDto setAssigneeLogin(@Nullable String s) { + this.assigneeLogin = s; + return this; + } + @CheckForNull public String getAuthorLogin() { return authorLogin; diff --git a/server/sonar-db-dao/src/main/resources/org/sonar/db/issue/IssueMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/issue/IssueMapper.xml index 059c6f76c53..933fa200820 100644 --- a/server/sonar-db-dao/src/main/resources/org/sonar/db/issue/IssueMapper.xml +++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/issue/IssueMapper.xml @@ -363,11 +363,13 @@ select - + , + u.login as assigneeLogin from (select row_number() over(order by i.issue_creation_date ASC) as row_number, @@ -388,11 +391,13 @@ inner join rules r on r.uuid=i.rule_uuid inner join components p on p.uuid=i.component_uuid inner join components root on root.uuid=i.project_uuid + left join users u on i.assignee = u.uuid -- 2.39.5