diff --git a/app/controllers/workflows_controller.rb b/app/controllers/workflows_controller.rb index 7f397bc4e..793635667 100644 --- a/app/controllers/workflows_controller.rb +++ b/app/controllers/workflows_controller.rb @@ -38,7 +38,7 @@ class WorkflowsController < ApplicationController } } if @role.save - redirect_to :action => 'edit', :role_id => @role, :tracker_id => @tracker + redirect_to :action => 'edit', :role_id => @role, :tracker_id => @tracker, :used_statuses_only => params[:used_statuses_only] return end end @@ -64,7 +64,7 @@ class WorkflowsController < ApplicationController if request.post? && @role && @tracker WorkflowPermission.replace_permissions(@tracker, @role, params[:permissions] || {}) - redirect_to :action => 'permissions', :role_id => @role, :tracker_id => @tracker + redirect_to :action => 'permissions', :role_id => @role, :tracker_id => @tracker, :used_statuses_only => params[:used_statuses_only] return end diff --git a/app/views/workflows/edit.html.erb b/app/views/workflows/edit.html.erb index 25034e379..71db6ad4e 100644 --- a/app/views/workflows/edit.html.erb +++ b/app/views/workflows/edit.html.erb @@ -31,6 +31,7 @@ <%= form_tag({}, :id => 'workflow_form' ) do %> <%= hidden_field_tag 'tracker_id', @tracker.id %> <%= hidden_field_tag 'role_id', @role.id %> + <%= hidden_field_tag 'used_statuses_only', params[:used_statuses_only] %>
<%= render :partial => 'form', :locals => {:name => 'always', :workflows => @workflows['always']} %> diff --git a/app/views/workflows/permissions.html.erb b/app/views/workflows/permissions.html.erb index 2e7c4e092..ecfadec02 100644 --- a/app/views/workflows/permissions.html.erb +++ b/app/views/workflows/permissions.html.erb @@ -30,6 +30,7 @@ <%= form_tag({}, :id => 'workflow_form' ) do %> <%= hidden_field_tag 'tracker_id', @tracker.id %> <%= hidden_field_tag 'role_id', @role.id %> + <%= hidden_field_tag 'used_statuses_only', params[:used_statuses_only] %>