]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5708 This is not possible to create or update a filter with the criteria "Assig...
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Fri, 10 Oct 2014 12:48:50 +0000 (14:48 +0200)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Fri, 10 Oct 2014 12:48:50 +0000 (14:48 +0200)
server/sonar-web/src/main/webapp/WEB-INF/app/controllers/issues_controller.rb

index 7690cea09be4f502d697d2094329df30ab9ebe28..92f2154bb44d05f36454913f245a122fa7feb368 100644 (file)
@@ -84,7 +84,7 @@ class IssuesController < ApplicationController
     require_parameters :id
 
     @filter = Internal.issues.updateIssueFilterQuery(params[:id].to_i, criteria_params)
-    redirect_to :action => 'filter', :id => @filter.id.to_s
+    render :text => @filter.id.to_s, :status => 200
   end
 
   # GET /issues/edit_form/<filter id>
@@ -186,7 +186,7 @@ class IssuesController < ApplicationController
     new_params = params.clone
     new_params.delete('controller')
     new_params.delete('action')
-    translate_unassigned(new_params)
+    new_params
   end
 
   def init_params
@@ -197,16 +197,6 @@ class IssuesController < ApplicationController
     Internal.issues.sanitizeFilterQuery(params).to_hash
   end
 
-  def translate_unassigned(issues_query_params)
-    if issues_query_params.has_key?(:assignees) && issues_query_params[:assignees] == '<unassigned>'
-      issues_query_params.delete(:assignees)
-      issues_query_params[:assigned] = false
-    else
-      issues_query_params[:assigned] = nil
-    end
-    issues_query_params
-  end
-
   def issues_query_params_from_filter(filter)
     Internal.issues.deserializeFilterQuery(filter).to_hash
   end