aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/controllers/issues_controller.rb1
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/controllers/measures_controller.rb1
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/_filter_shared_form.html.erb4
3 files changed, 4 insertions, 2 deletions
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/issues_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/issues_controller.rb
index fc6ad3c817a..7690cea09be 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/issues_controller.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/issues_controller.rb
@@ -109,6 +109,7 @@ class IssuesController < ApplicationController
def copy_form
require_parameters :id
@filter = find_filter(params[:id].to_i)
+ @filter.setUser(nil)
@filter.setShared(false)
render :partial => 'issues/filter_copy_form'
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/measures_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/measures_controller.rb
index ca126096321..7c955be664b 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/measures_controller.rb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/measures_controller.rb
@@ -166,6 +166,7 @@ class MeasuresController < ApplicationController
require_parameters :id
@filter = find_filter(params[:id])
@filter.shared = false
+ @filter.user_id = nil
render :partial => 'measures/copy_form'
end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/_filter_shared_form.html.erb b/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/_filter_shared_form.html.erb
index d90b9660b73..24c3891792a 100644
--- a/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/_filter_shared_form.html.erb
+++ b/server/sonar-web/src/main/webapp/WEB-INF/app/views/issues/_filter_shared_form.html.erb
@@ -22,7 +22,7 @@
<% end %>
<% if Internal.issues.canUserShareIssueFilter() %>
<div class="modal-field">
- <% if !@filter || @filter.user == current_user.login %>
+ <% if !@filter || @filter.user.nil? || @filter.user == current_user.login %>
<label for="shared"><%= message('issue_filter.form.share') -%></label>
<input id="shared" name="shared" type="checkbox" value="true" <%= 'checked' if (@filter && @filter.shared) -%>/>
<% else %>
@@ -30,4 +30,4 @@
<% end %>
</div>
<% end %>
-</div> \ No newline at end of file
+</div>