]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4391 Do not save page index in issue filter
authorJulien Lancelot <julien.lancelot@gmail.com>
Thu, 20 Jun 2013 15:44:01 +0000 (17:44 +0200)
committerJulien Lancelot <julien.lancelot@gmail.com>
Thu, 20 Jun 2013 15:44:11 +0000 (17:44 +0200)
sonar-server/src/main/webapp/WEB-INF/app/controllers/issues_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/views/issues/manage.html.erb

index 20612978038a7f99a0c188fb77f7d018dd880fbb..5fb1f0499ac81a5b3f531fccb611843b73bbacc7 100644 (file)
@@ -67,7 +67,7 @@ class IssuesController < ApplicationController
 
   # GET /issues/save_as_form?[&criteria]
   def save_as_form
-    @filter_query_serialized = Internal.issues.serializeFilterQuery(criteria_params)
+    @filter_query_serialized = Internal.issues.serializeFilterQuery(criteria_params_to_save)
     render :partial => 'issues/save_as_form'
   end
 
@@ -91,7 +91,7 @@ class IssuesController < ApplicationController
     verify_post_request
     require_parameters :id
 
-    filter_result = Internal.issues.updateIssueFilterQuery(params[:id].to_i, criteria_params)
+    filter_result = Internal.issues.updateIssueFilterQuery(params[:id].to_i, criteria_params_to_save)
     if filter_result.ok
       @filter = filter_result.get()
       redirect_to :action => 'filter', :id => @filter.id.to_s
@@ -200,4 +200,11 @@ class IssuesController < ApplicationController
     criteria
   end
 
+  def criteria_params_to_save
+    criteria = criteria_params
+    criteria.delete('id')
+    criteria.delete('pageIndex')
+    criteria
+  end
+
 end
\ No newline at end of file
index 766f78756b57f16da87ca2850f5cf154f0abcaa5..67f29e04c80525b23064ac28f6b33933d7473277 100644 (file)
@@ -77,6 +77,8 @@
         </tbody>
       </table>
 
+      <br/>
+
       <h1><%= message 'issue_filter.manage.shared_filters' -%></h1>
       <table class="data" id="shared-filters">
         <thead>