def bulk_change
verify_post_request
Internal.issues.bulkChange(params, params[:comment])
- render :text => params[:issues_query_params], :status => 200
+ render :text => '', :status => 200
end
}
// refresh page after issues bulk change
- function onBulkIssues(issues_query_params, component_key){
+ function onBulkIssues(issues_query_params){
window.location.reload();
}
}
// refresh page after issues bulk change
- function onBulkIssues(issues_query_params, component_key){
- d(component_key);
+ function onBulkIssues(issues_query_params){
+ d(issues_query_params['components']);
closeModalWindow();
}
</script>
issues = issues_result.issues
max_page_size_reached = issues_result.issues.size >= issues_result.paging.pageSize()
- component_key = issue_query.components.to_a.first if issue_query.components and issue_query.components.size == 1
project_key = issue_query.componentRoots.to_a.first if issue_query.componentRoots and issue_query.componentRoots.size == 1
- if params[:from] == 'drilldown' && !project_key
- project_key = Project.by_key(component_key).root_project.kee
- end
transitions_by_issues = {}
unresolved_issues = 0
%>
<form id="bulk-change-form" method="post" action="<%= ApplicationController.root_context -%>/issues/bulk_change">
<input type="hidden" name="issues" value="<%= issues.map { |issue| issue.key() }.join(',') -%>">
- <input type="hidden" name="issues_query_params" value="<%= params.to_query -%>">
<input type="hidden" name="actions[]" id="bulk-change-transition-action">
<fieldset>
<div class="modal-head">
</form>
<script>
$j("#bulk-change-form").modalForm({
- success: function (data) {
- onBulkIssues(data, '<%= component_key %>');
+ success: function () {
+ onBulkIssues(<%= params.to_json -%>);
},
error: function (xhr, textStatus, errorThrown) {
$j('#bulk-change-loading-image').addClass("hidden");
<script type="text/javascript">
function onBulkIssues(issues_query_params, component_key){
- window.location = baseUrl + '/issues/search?' + issues_query_params;
+ window.location = baseUrl + '/issues/search?' + jQuery.param(issues_query_params);
}
</script>
\ No newline at end of file
<% first=true %>
<% if logged_in? && @display_issues %>
<li class="<%= 'first' if first -%>">
- <a href="<%= url_for @issues_params.merge({:controller => 'issues', :action => 'bulk_change_form'}) -%>"
+ <a href="<%= url_for @issues_params.merge({:controller => 'issues', :action => 'bulk_change_form', 'componentRoots' => @resource.root ? @resource.root.key : nil}) -%>"
class="bulk-change-link open-modal"><%= message('bulk_change') -%></a>
</li>
<% first=false
// Always display title in popup mode
openAccordionItem('<%= url_for(params.merge({:display_title => 'true', :popup => 'true'})) -%>', this);
});
+
+ // refresh page after issues bulk change
+ function onBulkIssues(issues_query_params){
+ window.location.reload();
+ }
</script>
\ No newline at end of file