]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4851 fix selection on "Unassigned" field
authorSimon Brandhof <simon.brandhof@gmail.com>
Wed, 4 Dec 2013 15:27:52 +0000 (16:27 +0100)
committerSimon Brandhof <simon.brandhof@gmail.com>
Wed, 4 Dec 2013 15:28:01 +0000 (16:28 +0100)
sonar-server/src/main/webapp/WEB-INF/app/views/issues/search.html.erb

index 5e76ae28b09206c456d2f1c52a72c397950d6ded..90aacb226e9cb5859928fc1ccacb1487b560b3a5 100644 (file)
 
 <%
    component_labels = Project.by_keys(@issues_query.componentRoots).map{|c| c ? c.name : nil}
+   assignee_keys = @issues_query.assignees
    assignee_labels = user_labels(@issues_query.assignees)
+   if @issues_query.assigned==false
+     assignee_keys = ['<unassigned>'] + assignee_keys
+     assignee_labels = [message('unassigned')] + assignee_labels
+   end
    reporter_labels = user_labels(@issues_query.reporters)
 %>
 
@@ -94,7 +99,7 @@
     { key: 'severities[]', value: <%= @issues_query.severities.to_json -%> },
     { key: 'statuses[]', value: <%= @issues_query.statuses.to_json -%> },
     { key: 'resolutions[]', value: <%= @issues_query.resolutions.to_json -%> },
-    { key: 'assignees', value: <%= @issues_query.assignees.to_json -%>, text: <%= assignee_labels.to_json -%> },
+    { key: 'assignees', value: <%= assignee_keys.to_json -%>, text: <%= assignee_labels.to_json -%> },
     { key: 'reporters', value: <%= @issues_query.reporters.to_json -%>, text: <%= reporter_labels.to_json -%> },
     { key: 'createdAfter', value: '<%= Api::Utils.format_date(@issues_query.createdAfter) -%>' },
     { key: 'createdBefore', value: '<%= Api::Utils.format_date(@issues_query.createdBefore) -%>' }