aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@gmail.com>2013-05-28 11:45:36 +0200
committerJulien Lancelot <julien.lancelot@gmail.com>2013-05-28 11:45:36 +0200
commit2152e61011a569f599eb22baa1575e7e303cfacc (patch)
tree5bbed900b9b60c7895c52eea95267cfa47545b14
parentc9138a48b90b56f1faa62a4b4e57c66de893912c (diff)
downloadsonarqube-2152e61011a569f599eb22baa1575e7e303cfacc.tar.gz
sonarqube-2152e61011a569f599eb22baa1575e7e303cfacc.zip
SONAR-4359 Issues tab in Code viewer -> Remove "Unassigned" and "unplanned" filters and display only unresolved issues
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb13
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/resource/_rules_filter_issues.html.erb7
2 files changed, 3 insertions, 17 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb
index d0f6b788808..28d71e7ccd0 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/resource_controller.rb
@@ -294,13 +294,11 @@ class ResourceController < ApplicationController
@expandable = (@lines != nil)
@filtered = !@expanded
rule_param = params[:rule]
-
- # TODO Display only status not closed and resolution not false-positive
- options = {'components' => @resource.key, 'statuses' => ['OPEN', 'REOPENED', 'RESOLVED']}
+ options = {'components' => @resource.key, 'resolved' => 'false'}
if rule_param.blank? && params[:metric]
metric = Metric.by_id(params[:metric])
- if metric && (metric.name=='unassigned_issues' || metric.name=='unplanned_issues' || metric.name=='false_positive_issues')
+ if metric && (metric.name=='false_positive_issues')
rule_param = metric.name.gsub(/new_/, '')
# hack to select the correct option in the rule filter select-box
@@ -311,12 +309,7 @@ class ResourceController < ApplicationController
if !rule_param.blank? && rule_param != 'all'
if rule_param=='false_positive_issues'
options['resolutions'] = 'FALSE-POSITIVE'
-
- elsif rule_param=='unassigned_issues'
- options['assigned'] = false
-
- elsif rule_param=='unplanned_issues'
- options['planned'] = false
+ options['resolved'] = 'true'
elsif Sonar::RulePriority.id(rule_param)
options['severities'] = rule_param
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_rules_filter_issues.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_rules_filter_issues.html.erb
index e26bc026875..6996c61afd9 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_rules_filter_issues.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/resource/_rules_filter_issues.html.erb
@@ -49,13 +49,6 @@
<option value="false_positive_issues" <%= 'selected' if params[:rule]=="false_positive_issues" -%>>
<%= message('issues_viewer.issue_filter.false_positives') -%>
</option>
- <option value="unassigned_issues" <%= 'selected' if params[:rule]=="unassigned_issues" -%>>
- <%= message('issues_viewer.issue_filter.unassigned') -%>
- </option>
- <option value="unplanned_issues" <%= 'selected' if params[:rule]=="unplanned_issues" -%>>
- <%= message('issues_viewer.issue_filter.unplanned') -%>
- </option>
-
<optgroup label="<%= message('severity') -%>">
<% if blocker_issues