]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3755 Fix problem on issues search when component do not exists anymore + fix...
authorJulien Lancelot <julien.lancelot@gmail.com>
Tue, 4 Jun 2013 12:55:05 +0000 (14:55 +0200)
committerJulien Lancelot <julien.lancelot@gmail.com>
Tue, 4 Jun 2013 12:55:05 +0000 (14:55 +0200)
plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties
sonar-server/src/main/webapp/WEB-INF/app/views/issue/_show.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/issues/_list.html.erb

index 091228a71682bdea3cbb5e917792ad4295e69177..d00d26da9b7fe4740f5081f9f7a722c9846bd1f7 100644 (file)
@@ -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
 
index 3c739d0c44732754ed43aadf770d8d8b9ef8dc5b..a8d23fa94378357d91e7f0fa3aa56470dca92395 100644 (file)
@@ -1,16 +1,21 @@
 <div class="source_title">
   <%
     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() %>
   <div class="subtitle">
     <%= h project.longName() -%>
   </div>
   <% end %>
   <span class="h1">
-    <a href="<%= ApplicationController.root_context -%>/resource/index/<%= component.key() -%>?layout=false&tab=issues" onclick="window.open(this.href,'resource-<%= component.key().parameterize -%>','height=800,width=900,scrollbars=1,resizable=1');return false;"><%= h component.longName() -%></a>
+    <% if component %>
+    <a href="<%= ApplicationController.root_context -%>/resource/index/<%= component.key() -%>?layout=false&tab=issues"
+       onclick="window.open(this.href,'resource-<%= component.key().parameterize -%>','height=800,width=900,scrollbars=1,resizable=1');return false;"><%= h component.longName() -%></a>
+    <% else %>
+      <%= h @issue.componentKey() + '['+ message('issue.component_deleted') + ']' -%>
+    <% end %>
   </span>
 </div>
 
index 1c37bd8933e84d588d57a50d114b1de9493481e4..ef3850ab90eff9827cc1d328ce848888db01e7f8 100644 (file)
@@ -79,7 +79,8 @@
             <%= h (truncate(@filter.issues_result.project(issue).name, :length => 100)) -%>
           </td>
           <td>
-            <%= h @filter.issues_result.component(issue).name -%>
+            <% component = @filter.issues_result.component(issue) %>
+            <%= h component.name if component -%>
           </td>
           <td>
             <%= h @filter.issues_result.user(issue.assignee).name if issue.assignee -%>