summaryrefslogtreecommitdiffstats
path: root/app/controllers/issue_statuses_controller.rb
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2009-12-11 18:48:34 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2009-12-11 18:48:34 +0000
commit4fe14e71c2d76a2e92da0aaa71e18493d65b1fc1 (patch)
tree0ef000f0e3985772228928b0acdca1a292f82ef6 /app/controllers/issue_statuses_controller.rb
parenta83501364d0aa5e5e6d7a9e4ccfa2be5dab555b0 (diff)
downloadredmine-4fe14e71c2d76a2e92da0aaa71e18493d65b1fc1.tar.gz
redmine-4fe14e71c2d76a2e92da0aaa71e18493d65b1fc1.zip
Adds a Setting to control how an Issue's done_ratio is calculated:
* Issue field (default) - the done_ratio field for the Issue * Issue status - uses the Issue Status's value #4274 git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3151 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/issue_statuses_controller.rb')
-rw-r--r--app/controllers/issue_statuses_controller.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/app/controllers/issue_statuses_controller.rb b/app/controllers/issue_statuses_controller.rb
index bee7f4833..3be6abf3f 100644
--- a/app/controllers/issue_statuses_controller.rb
+++ b/app/controllers/issue_statuses_controller.rb
@@ -18,7 +18,7 @@
class IssueStatusesController < ApplicationController
before_filter :require_admin
- verify :method => :post, :only => [ :destroy, :create, :update, :move ],
+ verify :method => :post, :only => [ :destroy, :create, :update, :move, :update_issue_done_ratio ],
:redirect_to => { :action => :list }
def index
@@ -66,4 +66,13 @@ class IssueStatusesController < ApplicationController
flash[:error] = "Unable to delete issue status"
redirect_to :action => 'list'
end
+
+ def update_issue_done_ratio
+ if IssueStatus.update_issue_done_ratios
+ flash[:notice] = l(:notice_issue_done_ratios_updated)
+ else
+ flash[:error] = l(:error_issue_done_ratios_not_updated)
+ end
+ redirect_to :action => 'list'
+ end
end