From b71e259ab5ceab64c9c7ae4e982060ac3db5f72d Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Tue, 4 Jun 2013 14:55:05 +0200 Subject: [PATCH] SONAR-3755 Fix problem on issues search when component do not exists anymore + fix some typo on False positives --- .../src/main/resources/org/sonar/l10n/core.properties | 5 +++-- .../webapp/WEB-INF/app/views/issue/_show.html.erb | 11 ++++++++--- .../webapp/WEB-INF/app/views/issues/_list.html.erb | 3 ++- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties index 091228a7168..d00d26da9b7 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties @@ -501,6 +501,7 @@ issue.planned_for=Planned for issue.manual.missing_rule=Missing rule issue.manual.no_rules=No rules. issue.reported_by=Reported by +issue.component_deleted=Removed component #------------------------------------------------------------------------------ @@ -988,7 +989,7 @@ widget.my_reviews.no_issue=No issue. widget.my_reviews.property.numberOfLines.name=Number of lines widget.my_reviews.property.numberOfLines.desc=Maximum number of issues displayed at the same time. -widget.false_positive_reviews.name=False Positives Issues +widget.false_positive_reviews.name=False Positives widget.false_positive_reviews.description=Shows all the false positives found on the project. widget.false_positive_reviews.property.numberOfLines.name=Number of lines widget.false_positive_reviews.property.numberOfLines.desc=Maximum number of issues displayed at the same time. @@ -1003,7 +1004,7 @@ widget.unresolved_issues_statuses.description=Displays the number of unresolved widget.action_plans.name=Action Plans widget.action_plans.description=Shows all the open action plans of the project. widget.action_plans.property.showResolvedIssues.name=Show Resolved Issues -widget.action_plans.title=Open action plans +widget.action_plans.title=Open Action Plans widget.action_plans.no_action_plan=No action plan widget.action_plans.x_unresolved_issues={0} unresolved issues diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/issue/_show.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/issue/_show.html.erb index 3c739d0c447..a8d23fa9437 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/issue/_show.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/issue/_show.html.erb @@ -1,16 +1,21 @@
<% project = @issue_results.project(@issue) - component = @issue_results.component(@issue) + component = @issue_results.component(@issue) %> - <% if component.key() != project.key() %> + <% if @issue.componentKey() != project.key() %>
<%= h project.longName() -%>
<% end %> - <%= h component.longName() -%> + <% if component %> + <%= h component.longName() -%> + <% else %> + <%= h @issue.componentKey() + '['+ message('issue.component_deleted') + ']' -%> + <% end %>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/issues/_list.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/issues/_list.html.erb index 1c37bd8933e..ef3850ab90e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/issues/_list.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/issues/_list.html.erb @@ -79,7 +79,8 @@ <%= h (truncate(@filter.issues_result.project(issue).name, :length => 100)) -%> - <%= h @filter.issues_result.component(issue).name -%> + <% component = @filter.issues_result.component(issue) %> + <%= h component.name if component -%> <%= h @filter.issues_result.user(issue.assignee).name if issue.assignee -%> -- 2.39.5